feat: add thinking settings to compatible anthropic api (#1017)

This commit is contained in:
JeffJiang
2026-03-08 20:18:21 +08:00
committed by GitHub
parent 511e9eaf5e
commit 3512279ce3
4 changed files with 443 additions and 6 deletions

View File

@@ -20,3 +20,10 @@ class ModelConfig(BaseModel):
description="Extra settings to be passed to the model when thinking is enabled",
)
supports_vision: bool = Field(default_factory=lambda: False, description="Whether the model supports vision/image inputs")
thinking: dict | None = Field(
default_factory=lambda: None,
description=(
"Thinking settings for the model. If provided, these settings will be passed to the model when thinking is enabled. "
"This is a shortcut for `when_thinking_enabled` and will be merged with `when_thinking_enabled` if both are provided."
),
)