Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed apps/desktop/icons/tray_anim/frame_00.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_01.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_02.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_03.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_04.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_05.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_06.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_07.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_08.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_09.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_10.png
Binary file not shown.
Binary file removed apps/desktop/icons/tray_anim/frame_11.png
Binary file not shown.
10 changes: 9 additions & 1 deletion packages/runtime/src/ginno_runtime/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,15 @@ def build_model(
# effort——任何 `thinking` 参数都触发 400 「cannot be set
# simultaneously」。cfg["thinking_param_style"]="reasoning_effort"
# 时改走 effort 直传,不发 thinking 块参数。
if str(cfg.get("thinking_param_style") or "") == "reasoning_effort":
#
# codex 模型同款(2026-11-23 用户报障「anthropic 下选了档位报错」):
# codex 系(gpt-5.x-codex / gpt-6.2-sol)只吃 reasoning_effort,
# 走默认的 thinking/budget_tokens 路径必被网关拒——anthropic 壳
# 下 codex 自动按 reasoning_effort 直传,无需手工配
# thinking_param_style(off 映射 minimal:codex 值域无 off)。
if str(cfg.get("thinking_param_style") or "") == "reasoning_effort" or codex_efforts(
model
):
chat_kwargs["reasoning_effort"] = "minimal" if effort == "off" else effort
elif effort == "off":
# 显式关(网关可能默认开);多数 Claude 模型等价于不传。
Expand Down
37 changes: 37 additions & 0 deletions packages/runtime/tests/unit/test_models_thinking.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,40 @@ def test_generic_off_still_minimal_openai_official(monkeypatch):
# 本修复无关)。
m = _mk_zhipu(monkeypatch)("custom", "chatgpt-api/gpt-6.2-astra", thinking_effort="off")
assert getattr(m, "reasoning_effort", None) == "minimal"


def test_anthropic_codex_effort_direct_reasoning_effort(monkeypatch):
"""anthropic 协议 + codex 模型:档位直传 reasoning_effort,不发 thinking 块。

2026-11-23 报障回案:gpt-5.3-codex 走 anthropic 壳网关时默认路径是
thinking/budget_tokens——网关拒(400)。修复后 codex 自动按 effort
直传。off 在入层前已被 codex 归一化为 low(resolve_model_effort 的
legacy 规则:codex 值域无 off,落 low 兜底)。
"""
captured: dict = {}

class _FakeAnthropic:
def __init__(self, **kw):
captured.update(kw)

import ginno_runtime.models as models_mod

monkeypatch.setattr(models_mod, "_healing_chat_anthropic", lambda: _FakeAnthropic)
cfg = _cfg(
protocol="anthropic",
base_url="https://gw.example/anthropic",
model="gpt-5.3-codex",
)
monkeypatch.setattr(
prov_mod, "load_providers", lambda: {"p": {**cfg, "id": "p"}}
)
m = build_model("p", model_name="gpt-5.3-codex", thinking_effort="high")
assert m is not None
assert captured.get("reasoning_effort") == "high"
assert "thinking" not in captured, "codex 不应走 budget_tokens 路径"

captured.clear()
build_model("p", model_name="gpt-5.3-codex", thinking_effort="off")
# off → resolve 层归一化为 low(codex 无 off 档),仍走 effort 直传。
assert captured.get("reasoning_effort") == "low"
assert "thinking" not in captured
Loading