fix: session naming/"none" reasoning effort fails for gpt-6.1-sol (#12605)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -283,7 +283,7 @@
|
||||
"env": [
|
||||
"BASETEN_API_KEY"
|
||||
],
|
||||
"model_count": 23
|
||||
"model_count": 24
|
||||
},
|
||||
{
|
||||
"id": "bee",
|
||||
@@ -416,7 +416,7 @@
|
||||
"env": [
|
||||
"CORTECS_API_KEY"
|
||||
],
|
||||
"model_count": 109
|
||||
"model_count": 110
|
||||
},
|
||||
{
|
||||
"id": "crof",
|
||||
@@ -438,7 +438,7 @@
|
||||
"env": [
|
||||
"CROSSMODEL_API_KEY"
|
||||
],
|
||||
"model_count": 66
|
||||
"model_count": 67
|
||||
},
|
||||
{
|
||||
"id": "crusoe",
|
||||
@@ -549,7 +549,7 @@
|
||||
"env": [
|
||||
"EDENAI_API_KEY"
|
||||
],
|
||||
"model_count": 283
|
||||
"model_count": 286
|
||||
},
|
||||
{
|
||||
"id": "empiriolabs",
|
||||
@@ -637,7 +637,7 @@
|
||||
"env": [
|
||||
"GITHUB_TOKEN"
|
||||
],
|
||||
"model_count": 32
|
||||
"model_count": 34
|
||||
},
|
||||
{
|
||||
"id": "gmicloud",
|
||||
@@ -880,7 +880,7 @@
|
||||
"env": [
|
||||
"KILO_API_KEY"
|
||||
],
|
||||
"model_count": 392
|
||||
"model_count": 394
|
||||
},
|
||||
{
|
||||
"id": "kimi-code-plan-cn",
|
||||
@@ -957,7 +957,7 @@
|
||||
"env": [
|
||||
"LLMGATEWAY_API_KEY"
|
||||
],
|
||||
"model_count": 213
|
||||
"model_count": 214
|
||||
},
|
||||
{
|
||||
"id": "llmgateway-providers",
|
||||
@@ -968,7 +968,7 @@
|
||||
"env": [
|
||||
"LLMGATEWAY_API_KEY"
|
||||
],
|
||||
"model_count": 441
|
||||
"model_count": 432
|
||||
},
|
||||
{
|
||||
"id": "llmtech",
|
||||
@@ -1243,7 +1243,7 @@
|
||||
"env": [
|
||||
"NANO_GPT_API_KEY"
|
||||
],
|
||||
"model_count": 602
|
||||
"model_count": 600
|
||||
},
|
||||
{
|
||||
"id": "nearai",
|
||||
@@ -1354,7 +1354,7 @@
|
||||
"env": [
|
||||
"OFOX_API_KEY"
|
||||
],
|
||||
"model_count": 149
|
||||
"model_count": 150
|
||||
},
|
||||
{
|
||||
"id": "ollama-cloud",
|
||||
@@ -1376,7 +1376,7 @@
|
||||
"env": [
|
||||
"OPENCODE_API_KEY"
|
||||
],
|
||||
"model_count": 113
|
||||
"model_count": 114
|
||||
},
|
||||
{
|
||||
"id": "opencode-go",
|
||||
@@ -1475,7 +1475,7 @@
|
||||
"env": [
|
||||
"PIONEER_API_KEY"
|
||||
],
|
||||
"model_count": 114
|
||||
"model_count": 116
|
||||
},
|
||||
{
|
||||
"id": "poe",
|
||||
@@ -1553,7 +1553,7 @@
|
||||
"env": [
|
||||
"REQUESTY_API_KEY"
|
||||
],
|
||||
"model_count": 161
|
||||
"model_count": 165
|
||||
},
|
||||
{
|
||||
"id": "routing-run",
|
||||
@@ -1608,7 +1608,7 @@
|
||||
"env": [
|
||||
"SCALEWAY_API_KEY"
|
||||
],
|
||||
"model_count": 15
|
||||
"model_count": 16
|
||||
},
|
||||
{
|
||||
"id": "scnet-token-plan",
|
||||
@@ -1767,14 +1767,14 @@
|
||||
},
|
||||
{
|
||||
"id": "tempr",
|
||||
"display_name": "Tempr",
|
||||
"display_name": "Tempr Gateway",
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"api": "https://api.temprhq.io/v1",
|
||||
"doc": "https://temprhq.io/docs/gateway-reference.html",
|
||||
"env": [
|
||||
"TEMPR_API_KEY"
|
||||
],
|
||||
"model_count": 57
|
||||
"model_count": 82
|
||||
},
|
||||
{
|
||||
"id": "tencent-coding-plan",
|
||||
|
||||
@@ -1928,8 +1928,16 @@ pub(crate) fn openai_reasoning_efforts_for_model(model_name: &str) -> &'static [
|
||||
if normalized.contains("-pro") || normalized.contains("/pro") {
|
||||
&["high"]
|
||||
} else if normalized.contains("gpt-6") {
|
||||
// GPT-6 Astra does not accept `none`; Sol and Luna do.
|
||||
if normalized.contains("astra") {
|
||||
// GPT-6 Astra and GPT-6.1 Sol require reasoning; GPT-6 Sol and Luna may disable it.
|
||||
let is_gpt_6_1_sol = normalized
|
||||
.match_indices("gpt-6.1-sol")
|
||||
.any(|(index, name)| {
|
||||
let (prefix, rest) = normalized.split_at(index);
|
||||
let (_, suffix) = rest.split_at(name.len());
|
||||
(prefix.is_empty() || prefix.ends_with(['/', '.', '-']))
|
||||
&& (suffix.is_empty() || suffix.starts_with(['-', '@']))
|
||||
});
|
||||
if normalized.contains("astra") || is_gpt_6_1_sol {
|
||||
&["low", "medium", "high", "xhigh", "max"]
|
||||
} else {
|
||||
&["none", "low", "medium", "high", "xhigh", "max"]
|
||||
@@ -3431,6 +3439,13 @@ mod tests {
|
||||
"gpt-6-astra",
|
||||
"data_workflow_tools.goose.goose-gpt-6-astra",
|
||||
"openrouter/openai/gpt-6-astra",
|
||||
"gpt-6.1-sol",
|
||||
"gpt-6.1-sol-high",
|
||||
"data_workflow_tools.goose.goose-gpt-6.1-sol",
|
||||
"openrouter/openai/gpt-6.1-sol",
|
||||
"gpt-6.1-sol@eu",
|
||||
"openai/gpt-6.1-sol-fast",
|
||||
"openai/gpt-6.1-sol-fast-high",
|
||||
] {
|
||||
assert_eq!(
|
||||
openai_reasoning_effort_for_thinking(model, ThinkingEffort::Off),
|
||||
|
||||
Reference in New Issue
Block a user