fix(types): mark refusal fields read-only and sync API schema

This commit is contained in:
Houyun Sun 2026-10-31 17:54:57 +08:00
parent d7d9fa7530
commit 9054cddca2
3 changed files with 4 additions and 8 deletions

View file

@ -48157,7 +48157,6 @@
"type": "object"
},
"ChatCompletionRefusalObject": {
"description": "Assistant content part holding the refusal text of a turn the model declined.",
"properties": {
"cache_control": {
"$ref": "#/components/schemas/ChatCompletionCachedContent"

View file

@ -706,14 +706,14 @@ class ChatCompletionRedactedThinkingBlock(TypedDict, total=False):
class OpenAIChatCompletionRefusalObject(TypedDict):
"""Assistant content part holding the refusal text of a turn the model declined."""
type: Literal["refusal"]
refusal: str
type: ReadOnly[Literal["refusal"]]
refusal: ReadOnly[str]
class ChatCompletionRefusalObject(
OpenAIChatCompletionRefusalObject, total=False
): # litellm wrapper on top of openai object for handling cached content
cache_control: ChatCompletionCachedContent
cache_control: ReadOnly[ChatCompletionCachedContent]
class ChatCompletionReasoningSummaryTextBlock(TypedDict, total=False):

View file

@ -28953,10 +28953,7 @@ export interface components {
} & {
[key: string]: unknown;
};
/**
* ChatCompletionRefusalObject
* @description Assistant content part holding the refusal text of a turn the model declined.
*/
/** ChatCompletionRefusalObject */
ChatCompletionRefusalObject: {
cache_control?: components["schemas"]["ChatCompletionCachedContent"];
/** Refusal */