ChatModel

@Serializable
value class ChatModel(val id: String)

Identifier of a DeepSeek model, serialized as the raw slug the API expects.

The API serves two models — DEEPSEEK_FLASH and DEEPSEEK_V4_PRO — and answers an unknown slug with a 400 that names them both, so a typo fails loudly rather than silently picking a model:

The supported API model names are deepseek-flash, deepseek-v4-pro,
but you passed deepseek-does-not-exist.

Several retired names still resolve to DEEPSEEK_FLASH — deepseek-chat, deepseek-reasoner, deepseek-v4-flash and deepseek-v4-flash-vision-exp. The SDK declares constants only for the two the API acknowledges; any other slug can be wrapped directly, so an alias, or a model released after this version, stays usable:

val params = chatCompletionParams { model = ChatModel.DEEPSEEK_V4_PRO }
val alias = chatCompletionParams { model = ChatModel("deepseek-v4-flash") }

A response echoes the model that actually ran, which for every alias is deepseek-flash — read ChatCompletion.model rather than assuming the slug that was sent.

See also

Constructors

Link copied to clipboard
constructor(id: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val id: String

Raw model slug sent in the model field of a request. Must not be blank.

Functions

Link copied to clipboard
open override fun toString(): String