Returns
Returns the updated Model object.Example
Parameters
string
required
ID of the model to update.
string
New name for the model.
float
New cost in dollars per input token.
float
New cost in dollars per output token.
float
New cost in dollars per cached input token.
float
New cost in dollars per input token when creating a cache entry.
float
New cost in dollars per input token for contexts larger than 128k tokens.
float
New cost in dollars per output token for contexts larger than 128k tokens.
string
New tokenizer provider (e.g.,
"OpenAI", "Anthropic").string
New pricing source. This can be a URL to the model’s pricing page or documentation.
All fields except
model_id default to PydanticUndefined (from pydantic_core).
Omit a field (or pass PydanticUndefined) to leave it unchanged.
Pass None to explicitly clear an optional field.
Pass a value to update it.