Add unified thinking effort control across all providers (#9242)

Signed-off-by: jh-block <jhugo@block.xyz>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jh-block
2026-05-20 10:42:42 +02:00
committed by GitHub
parent c467e7f998
commit 98a54e9ec6
30 changed files with 2175 additions and 526 deletions
+80 -1
View File
@@ -1369,6 +1369,56 @@
}
}
},
"/config/providers/{name}/model-info": {
"post": {
"tags": [
"super::routes::config_management"
],
"operationId": "get_provider_model_info",
"parameters": [
{
"name": "name",
"in": "path",
"description": "Provider name (e.g., openai)",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderModelInfoQuery"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Model metadata fetched successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ModelInfo"
}
}
}
},
"400": {
"description": "Unknown provider, provider not configured, or authentication error"
},
"429": {
"description": "Rate limit exceeded"
},
"500": {
"description": "Internal server error"
}
}
}
},
"/config/providers/{name}/models": {
"get": {
"tags": [
@@ -1394,7 +1444,7 @@
"schema": {
"type": "array",
"items": {
"type": "string"
"$ref": "#/components/schemas/ModelInfo"
}
}
}
@@ -6533,6 +6583,10 @@
"description": "Cost per token for output in USD (optional)",
"nullable": true
},
"reasoning": {
"type": "boolean",
"description": "Whether this model supports reasoning/thinking controls"
},
"supports_cache_control": {
"type": "boolean",
"description": "Whether this model supports cache control",
@@ -6546,6 +6600,7 @@
"provider",
"model",
"context_limit",
"reasoning",
"currency"
],
"properties": {
@@ -6586,6 +6641,9 @@
},
"provider": {
"type": "string"
},
"reasoning": {
"type": "boolean"
}
}
},
@@ -6973,6 +7031,17 @@
}
}
},
"ProviderModelInfoQuery": {
"type": "object",
"required": [
"model"
],
"properties": {
"model": {
"type": "string"
}
}
},
"ProviderTemplate": {
"type": "object",
"required": [
@@ -8568,6 +8637,16 @@
}
}
},
"ThinkingEffort": {
"type": "string",
"enum": [
"off",
"low",
"medium",
"high",
"max"
]
},
"TokenState": {
"type": "object",
"required": [