From 008e6696f33de69cb118e3505e6192eae88eaee0 Mon Sep 17 00:00:00 2001 From: Completion Test Date: Wed, 30 Sep 2026 13:54:18 +1000 Subject: [PATCH 1/2] test: cover GPT-6 routing and model selection --- agent/ambiguity-analyst.md | 2 +- agent/explore.md | 2 +- agent/oracle.md | 2 +- agent/plan-critic.md | 2 +- agent/release-scribe.md | 2 +- agent/reviewer.md | 2 +- agent/specs/ambiguity-analyst.json | 2 +- agent/specs/explore.json | 2 +- agent/specs/oracle.json | 2 +- agent/specs/plan-critic.json | 2 +- agent/specs/release-scribe.json | 2 +- agent/specs/reviewer.json | 2 +- agent/specs/strategic-planner.json | 2 +- agent/specs/verifier.json | 2 +- agent/strategic-planner.md | 2 +- agent/verifier.md | 2 +- docs/model-allocation-policy.md | 12 +-- instructions/model_routing_schema.md | 6 +- .../gateway-core/routing-profiles.data.json | 6 +- scripts/selftest.py | 58 +++++++-------- tests/test_model_selection.py | 73 +++++++++++++++++++ 21 files changed, 130 insertions(+), 57 deletions(-) create mode 100644 tests/test_model_selection.py diff --git a/agent/ambiguity-analyst.md b/agent/ambiguity-analyst.md index 3ed1a887..a2f70701 100644 --- a/agent/ambiguity-analyst.md +++ b/agent/ambiguity-analyst.md @@ -2,7 +2,7 @@ description: >- Read-only planning analyst for uncovering assumptions, unknowns, and decision forks. mode: subagent -model: openai/gpt-5.6-sol +model: openai/gpt-6.1-sol tools: bash: false read: true diff --git a/agent/explore.md b/agent/explore.md index c8971ec4..52a85d50 100644 --- a/agent/explore.md +++ b/agent/explore.md @@ -2,7 +2,7 @@ description: >- Read-only internal codebase scout for fast discovery of implementation locations and local patterns. mode: subagent -model: openai/gpt-5.6-luna +model: openai/gpt-6-luna tools: bash: false read: true diff --git a/agent/oracle.md b/agent/oracle.md index 0bddb066..381e8cdd 100644 --- a/agent/oracle.md +++ b/agent/oracle.md @@ -2,7 +2,7 @@ description: >- Read-only technical advisor for hard architecture and debugging decisions under uncertainty. mode: subagent -model: openai/gpt-5.6-sol +model: openai/gpt-6.1-sol tools: bash: false read: true diff --git a/agent/plan-critic.md b/agent/plan-critic.md index cb048e94..77c2ff62 100644 --- a/agent/plan-critic.md +++ b/agent/plan-critic.md @@ -2,7 +2,7 @@ description: >- Read-only plan reviewer focused on feasibility, risk coverage, and testability before execution. mode: subagent -model: openai/gpt-5.6-sol +model: openai/gpt-6.1-sol tools: bash: false read: true diff --git a/agent/release-scribe.md b/agent/release-scribe.md index e1dba12b..c352f2df 100644 --- a/agent/release-scribe.md +++ b/agent/release-scribe.md @@ -2,7 +2,7 @@ description: >- Read-only release documentation specialist for PR summaries, changelog entries, and concise release notes. mode: subagent -model: openai/gpt-5.6-luna +model: openai/gpt-6-luna tools: bash: true read: true diff --git a/agent/reviewer.md b/agent/reviewer.md index f1b5c94a..1d6c2004 100644 --- a/agent/reviewer.md +++ b/agent/reviewer.md @@ -2,7 +2,7 @@ description: >- Read-only implementation reviewer focused on correctness, maintainability, safety, and regressions. mode: subagent -model: openai/gpt-5.6-sol +model: openai/gpt-6.1-sol tools: bash: false read: true diff --git a/agent/specs/ambiguity-analyst.json b/agent/specs/ambiguity-analyst.json index d98b75b7..2f1f28b0 100644 --- a/agent/specs/ambiguity-analyst.json +++ b/agent/specs/ambiguity-analyst.json @@ -1,7 +1,7 @@ { "name": "ambiguity-analyst", "mode": "subagent", - "model": "openai/gpt-5.6-sol", + "model": "openai/gpt-6.1-sol", "description_template": "Read-only planning analyst for uncovering assumptions, unknowns, and decision forks.", "tools": { "bash": false, diff --git a/agent/specs/explore.json b/agent/specs/explore.json index 666bbfdb..d8832ccc 100644 --- a/agent/specs/explore.json +++ b/agent/specs/explore.json @@ -1,7 +1,7 @@ { "name": "explore", "mode": "subagent", - "model": "openai/gpt-5.6-luna", + "model": "openai/gpt-6-luna", "description_template": "Read-only internal codebase scout for fast discovery of implementation locations and local patterns.", "tools": { "bash": false, diff --git a/agent/specs/oracle.json b/agent/specs/oracle.json index eddd19d6..0cc1366b 100644 --- a/agent/specs/oracle.json +++ b/agent/specs/oracle.json @@ -1,7 +1,7 @@ { "name": "oracle", "mode": "subagent", - "model": "openai/gpt-5.6-sol", + "model": "openai/gpt-6.1-sol", "description_template": "Read-only technical advisor for hard architecture and debugging decisions under uncertainty.", "tools": { "bash": false, diff --git a/agent/specs/plan-critic.json b/agent/specs/plan-critic.json index 0c0333e2..088c02a4 100644 --- a/agent/specs/plan-critic.json +++ b/agent/specs/plan-critic.json @@ -1,7 +1,7 @@ { "name": "plan-critic", "mode": "subagent", - "model": "openai/gpt-5.6-sol", + "model": "openai/gpt-6.1-sol", "description_template": "Read-only plan reviewer focused on feasibility, risk coverage, and testability before execution.", "tools": { "bash": false, diff --git a/agent/specs/release-scribe.json b/agent/specs/release-scribe.json index 30b19404..261911dc 100644 --- a/agent/specs/release-scribe.json +++ b/agent/specs/release-scribe.json @@ -1,7 +1,7 @@ { "name": "release-scribe", "mode": "subagent", - "model": "openai/gpt-5.6-luna", + "model": "openai/gpt-6-luna", "description_template": "Read-only release documentation specialist for PR summaries, changelog entries, and concise release notes.", "tools": { "bash": true, diff --git a/agent/specs/reviewer.json b/agent/specs/reviewer.json index 9eba5a98..a614542f 100644 --- a/agent/specs/reviewer.json +++ b/agent/specs/reviewer.json @@ -1,7 +1,7 @@ { "name": "reviewer", "mode": "subagent", - "model": "openai/gpt-5.6-sol", + "model": "openai/gpt-6.1-sol", "description_template": "Read-only implementation reviewer focused on correctness, maintainability, safety, and regressions.", "tools": { "bash": false, diff --git a/agent/specs/strategic-planner.json b/agent/specs/strategic-planner.json index f6b46bdc..d3a2b9a5 100644 --- a/agent/specs/strategic-planner.json +++ b/agent/specs/strategic-planner.json @@ -1,7 +1,7 @@ { "name": "strategic-planner", "mode": "subagent", - "model": "openai/gpt-5.6-sol", + "model": "openai/gpt-6.1-sol", "description_template": "Read-only planning specialist for sequencing, milestones, and execution structure.", "tools": { "bash": false, diff --git a/agent/specs/verifier.json b/agent/specs/verifier.json index 1513b71b..316c9226 100644 --- a/agent/specs/verifier.json +++ b/agent/specs/verifier.json @@ -1,7 +1,7 @@ { "name": "verifier", "mode": "subagent", - "model": "openai/gpt-5.6-luna", + "model": "openai/gpt-6-luna", "description_template": "Read-only validation specialist for test/lint/build execution and failure triage.", "tools": { "bash": true, diff --git a/agent/strategic-planner.md b/agent/strategic-planner.md index 23977334..a517b894 100644 --- a/agent/strategic-planner.md +++ b/agent/strategic-planner.md @@ -2,7 +2,7 @@ description: >- Read-only planning specialist for sequencing, milestones, and execution structure. mode: subagent -model: openai/gpt-5.6-sol +model: openai/gpt-6.1-sol tools: bash: false read: true diff --git a/agent/verifier.md b/agent/verifier.md index e960dab7..2ee61d0e 100644 --- a/agent/verifier.md +++ b/agent/verifier.md @@ -2,7 +2,7 @@ description: >- Read-only validation specialist for test/lint/build execution and failure triage. mode: subagent -model: openai/gpt-5.6-luna +model: openai/gpt-6-luna tools: bash: true read: true diff --git a/docs/model-allocation-policy.md b/docs/model-allocation-policy.md index 48e16d11..3e2a9e27 100644 --- a/docs/model-allocation-policy.md +++ b/docs/model-allocation-policy.md @@ -12,12 +12,12 @@ This policy keeps OpenAI Codex as the default path and uses Copilot-provided non | Band | Routing Category | Default Model | Reasoning | Use Case | | --- | --- | --- | --- | --- | -| fast | `quick` | `openai/gpt-5.6-luna` | `low` | high-frequency discovery/verification loops | +| fast | `quick` | `openai/gpt-6-luna` | `low` | high-frequency discovery/verification loops | | standard | `balanced` | `openai/gpt-5.6-terra` | `medium` | normal implementation and planning | | standard | `visual` | `openai/gpt-5.6-terra` | `medium` | browser-first UX/UI audits and design-heavy refinement | | standard | `writing` | `openai/gpt-5.6-terra` | `medium` | planning capture and writing-heavy artifact work | -| complex | `deep` | `openai/gpt-5.6-sol` | `medium` | multi-module architecture/debug work | -| critical | `critical` | `openai/gpt-5.6-sol` | `medium` | final risk review, release/security sign-off | +| complex | `deep` | `openai/gpt-6.1-sol` | `medium` | multi-module architecture/debug work | +| critical | `critical` | `openai/gpt-6.1-sol` | `medium` | final risk review, release/security sign-off | ## Default Agent Routing @@ -49,10 +49,10 @@ Agent specs explicitly pin category models when a fixed model is required. The p | Category | Primary | Fallback 1 | Fallback 2 | | --- | --- | --- | --- | -| `quick` | `openai/gpt-5.6-luna` | Copilot low-latency coding model | Copilot balanced coding model | +| `quick` | `openai/gpt-6-luna` | Copilot low-latency coding model | Copilot balanced coding model | | `balanced` | `openai/gpt-5.6-terra` (`medium`) | Copilot balanced reasoning model | Copilot high-reasoning model | -| `deep` | `openai/gpt-5.6-sol` (`medium`) | Copilot high-reasoning model | Copilot balanced reasoning model | -| `critical` | `openai/gpt-5.6-sol` (`medium`) | Copilot highest-reasoning available model | Copilot high-reasoning model | +| `deep` | `openai/gpt-6.1-sol` (`medium`) | Copilot high-reasoning model | Copilot balanced reasoning model | +| `critical` | `openai/gpt-6.1-sol` (`medium`) | Copilot highest-reasoning available model | Copilot high-reasoning model | | `visual` | `openai/gpt-5.6-terra` (`medium`) | Copilot visual-capable reasoning model | Copilot balanced model | | `writing` | `openai/gpt-5.6-terra` (`medium`) | Copilot strong writing/reasoning model | Copilot balanced model | diff --git a/instructions/model_routing_schema.md b/instructions/model_routing_schema.md index 10f94591..4648d333 100644 --- a/instructions/model_routing_schema.md +++ b/instructions/model_routing_schema.md @@ -40,10 +40,10 @@ Task 5.2 adds deterministic settings resolution: Current default model targets: -- `quick` -> `openai/gpt-5.6-luna` +- `quick` -> `openai/gpt-6-luna` - `balanced` -> `openai/gpt-5.6-terra` -- `deep` -> `openai/gpt-5.6-sol` -- `critical` -> `openai/gpt-5.6-sol` +- `deep` -> `openai/gpt-6.1-sol` +- `critical` -> `openai/gpt-6.1-sol` Resolution order is: diff --git a/plugin/gateway-core/routing-profiles.data.json b/plugin/gateway-core/routing-profiles.data.json index 5746227b..1021c082 100644 --- a/plugin/gateway-core/routing-profiles.data.json +++ b/plugin/gateway-core/routing-profiles.data.json @@ -3,7 +3,7 @@ "profiles": { "quick": { "description": "Fast responses for routine operational tasks", - "model": "openai/gpt-5.6-luna", + "model": "openai/gpt-6-luna", "temperature": 0.1, "reasoning": "low", "verbosity": "low" @@ -17,14 +17,14 @@ }, "deep": { "description": "Higher-reliability analysis for complex engineering work", - "model": "openai/gpt-5.6-sol", + "model": "openai/gpt-6.1-sol", "temperature": 0.1, "reasoning": "medium", "verbosity": "medium" }, "critical": { "description": "Critical-risk analysis and final safety review", - "model": "openai/gpt-5.6-sol", + "model": "openai/gpt-6.1-sol", "temperature": 0.0, "reasoning": "medium", "verbosity": "medium" diff --git a/scripts/selftest.py b/scripts/selftest.py index fc1881f2..ef4509f4 100644 --- a/scripts/selftest.py +++ b/scripts/selftest.py @@ -18414,7 +18414,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: and "balanced" in routing_categories and "critical" in routing_categories and routing_categories.get("quick", {}).get("model") - == "openai/gpt-5.6-luna", + == "openai/gpt-6-luna", "model routing schema should define balanced/critical categories and quick Luna profile", ) expect( @@ -18423,25 +18423,25 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: and routing_categories.get("visual", {}).get("model") == "openai/gpt-5.6-terra" and routing_categories.get("deep", {}).get("model") - == "openai/gpt-5.6-sol" + == "openai/gpt-6.1-sol" and routing_categories.get("critical", {}).get("model") - == "openai/gpt-5.6-sol" + == "openai/gpt-6.1-sol" and routing_categories.get("writing", {}).get("model") == "openai/gpt-5.6-terra", - "model routing schema should use current GPT-5.6 tiers for all categories", + "model routing schema should use current GPT-6 routing tiers for all categories", ) expected_subagent_models = { - "ambiguity-analyst": ("deep", "openai/gpt-5.6-sol"), + "ambiguity-analyst": ("deep", "openai/gpt-6.1-sol"), "experience-designer": ("visual", "openai/gpt-5.6-terra"), - "explore": ("quick", "openai/gpt-5.6-luna"), + "explore": ("quick", "openai/gpt-6-luna"), "librarian": ("balanced", "openai/gpt-5.6-terra"), - "oracle": ("critical", "openai/gpt-5.6-sol"), - "plan-critic": ("critical", "openai/gpt-5.6-sol"), - "release-scribe": ("quick", "openai/gpt-5.6-luna"), - "reviewer": ("critical", "openai/gpt-5.6-sol"), - "strategic-planner": ("deep", "openai/gpt-5.6-sol"), - "verifier": ("quick", "openai/gpt-5.6-luna"), + "oracle": ("critical", "openai/gpt-6.1-sol"), + "plan-critic": ("critical", "openai/gpt-6.1-sol"), + "release-scribe": ("quick", "openai/gpt-6-luna"), + "reviewer": ("critical", "openai/gpt-6.1-sol"), + "strategic-planner": ("deep", "openai/gpt-6.1-sol"), + "verifier": ("quick", "openai/gpt-6-luna"), } subagent_specs = {} for spec_path in sorted((AGENT_DIR / "specs").glob("*.json")): @@ -18450,7 +18450,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: subagent_specs[str(spec_payload.get("name") or "")] = spec_payload expect( set(subagent_specs) == set(expected_subagent_models), - "every custom subagent should be covered by the GPT-5.6 model matrix", + "every custom subagent should be covered by the GPT-6 routing model matrix", ) for agent_name, (expected_category, expected_model) in expected_subagent_models.items(): spec_payload = subagent_specs[agent_name] @@ -18461,7 +18461,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: ) expect( spec_payload.get("model") == expected_model, - f"{agent_name} should explicitly pin its expected GPT-5.6 model", + f"{agent_name} should explicitly pin its expected GPT-6 routing model", ) expect( routing_categories.get(expected_category, {}).get("model") @@ -18613,8 +18613,8 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: ) expect( resolved_requested.get("settings", {}).get("model") - == "openai/gpt-5.6-sol", - "deep category should resolve to GPT-5.6 Sol by default", + == "openai/gpt-6.1-sol", + "deep category should resolve to GPT-6.1 Sol by default", ) resolved_missing = resolve_category(routing_schema, "unknown") @@ -18627,7 +18627,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: resolved_unavailable = resolve_category( routing_schema, "deep", - available_models={"openai/gpt-5.6-luna"}, + available_models={"openai/gpt-6-luna"}, ) expect( resolved_unavailable.get("category") @@ -18647,14 +18647,14 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: "verbosity": "low", }, available_models={ - "openai/gpt-5.6-luna", + "openai/gpt-6-luna", "openai/gpt-5.6-terra", - "openai/gpt-5.6-sol", + "openai/gpt-6.1-sol", }, ) expect( resolved_with_precedence.get("settings", {}).get("model") - == "openai/gpt-5.6-sol", + == "openai/gpt-6.1-sol", "model routing should fallback to available category/system model deterministically", ) expect( @@ -18693,7 +18693,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: "--override-model", "openai/nonexistent", "--available-models", - "openai/gpt-5.6-luna,openai/gpt-5.6-terra,openai/gpt-5.6-sol", + "openai/gpt-6-luna,openai/gpt-5.6-terra,openai/gpt-6.1-sol", "--json", ], capture_output=True, @@ -18719,7 +18719,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: "--override-model", "openai/nonexistent", "--available-models", - "openai/gpt-5.6-luna,openai/gpt-5.6-terra,openai/gpt-5.6-sol", + "openai/gpt-6-luna,openai/gpt-5.6-terra,openai/gpt-6.1-sol", "--json", ], capture_output=True, @@ -18844,7 +18844,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: "--override-model", "openai/nonexistent", "--available-models", - "openai/gpt-5.6-luna,openai/gpt-5.6-terra,openai/gpt-5.6-sol", + "openai/gpt-6-luna,openai/gpt-5.6-terra,openai/gpt-6.1-sol", "--json", ], capture_output=True, @@ -18856,7 +18856,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: expect(routing_explain.returncode == 0, "routing explain should succeed") routing_explain_report = parse_json_output(routing_explain.stdout) expect( - routing_explain_report.get("selected_model") == "openai/gpt-5.6-sol", + routing_explain_report.get("selected_model") == "openai/gpt-6.1-sol", "routing explain should expose selected model", ) expect( @@ -18877,7 +18877,7 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: "--category", "quick", "--available-models", - "openai/gpt-5.6-luna,openai/gpt-5.6-terra,openai/gpt-5.6-sol", + "openai/gpt-6-luna,openai/gpt-5.6-terra,openai/gpt-6.1-sol", "--json", ], capture_output=True, @@ -18973,9 +18973,9 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: "verbosity": "medium", }, available_models={ - "openai/gpt-5.6-luna", + "openai/gpt-6-luna", "openai/gpt-5.6-terra", - "openai/gpt-5.6-sol", + "openai/gpt-6.1-sol", }, ) deterministic_trace_b = resolve_model_settings( @@ -18989,9 +18989,9 @@ def run_bg(*args: str) -> subprocess.CompletedProcess[str]: "verbosity": "medium", }, available_models={ - "openai/gpt-5.6-luna", + "openai/gpt-6-luna", "openai/gpt-5.6-terra", - "openai/gpt-5.6-sol", + "openai/gpt-6.1-sol", }, ) expect( diff --git a/tests/test_model_selection.py b/tests/test_model_selection.py new file mode 100644 index 00000000..e553a2c4 --- /dev/null +++ b/tests/test_model_selection.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +import json +import unittest +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parents[1] + + +class ModelSelectionTest(unittest.TestCase): + def _config(self) -> dict: + return json.loads((REPO_ROOT / "opencode.json").read_text(encoding="utf-8")) + + def _spec(self, name: str) -> dict: + return json.loads( + (REPO_ROOT / "agent" / "specs" / f"{name}.json").read_text( + encoding="utf-8" + ) + ) + + def test_gpt6_model_entries_have_exact_reasoning_variants(self) -> None: + expected_models = { + "gpt-6-luna": { + "name": "GPT-6 Luna", + "reasoning": True, + "variants": { + "none": {"reasoningEffort": "none"}, + "low": {"reasoningEffort": "low"}, + "medium": {"reasoningEffort": "medium"}, + "high": {"reasoningEffort": "high"}, + "xhigh": {"reasoningEffort": "xhigh"}, + "max": {"reasoningEffort": "max"}, + }, + }, + "gpt-6.1-sol": { + "name": "GPT-6.1 Sol", + "reasoning": True, + "variants": { + "low": {"reasoningEffort": "low"}, + "medium": {"reasoningEffort": "medium"}, + "high": {"reasoningEffort": "high"}, + "xhigh": {"reasoningEffort": "xhigh"}, + "max": {"reasoningEffort": "max"}, + }, + }, + } + + models = self._config()["provider"]["openai"]["models"] + self.assertEqual( + expected_models, + {model_id: models[model_id] for model_id in expected_models}, + ) + + def test_eight_routed_specs_use_gpt6_models(self) -> None: + expected_assignments = { + "explore": "openai/gpt-6-luna", + "verifier": "openai/gpt-6-luna", + "release-scribe": "openai/gpt-6-luna", + "strategic-planner": "openai/gpt-6.1-sol", + "ambiguity-analyst": "openai/gpt-6.1-sol", + "reviewer": "openai/gpt-6.1-sol", + "oracle": "openai/gpt-6.1-sol", + "plan-critic": "openai/gpt-6.1-sol", + } + + actual_assignments = { + name: self._spec(name)["model"] for name in expected_assignments + } + self.assertEqual(expected_assignments, actual_assignments) + + +if __name__ == "__main__": + unittest.main() From fbb636de2904addcd35721481abf4c327c9995ed Mon Sep 17 00:00:00 2001 From: Completion Test Date: Wed, 30 Sep 2026 14:04:46 +1000 Subject: [PATCH 2/2] test: align gateway fixtures with GPT-6 routing --- .../test/agent-model-resolver-hook.test.mjs | 10 +++++----- .../provider-model-budget-enforcer-hook.test.mjs | 2 +- .../test/routing-profiles-shared.test.mjs | 14 +++++++------- .../test/session-recovery-hook.test.mjs | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/plugin/gateway-core/test/agent-model-resolver-hook.test.mjs b/plugin/gateway-core/test/agent-model-resolver-hook.test.mjs index 5cb6a7f9..64e0b9e5 100644 --- a/plugin/gateway-core/test/agent-model-resolver-hook.test.mjs +++ b/plugin/gateway-core/test/agent-model-resolver-hook.test.mjs @@ -69,7 +69,7 @@ test("agent-model-resolver keeps routing metadata out of the provider prompt", a assert.equal(prompt, `${traceMarker}\n\n${callerPrompt}`) assert.equal(prompt.length - callerPrompt.length, 32) const legacyPrompt = [ - "[MODEL ROUTING] Preferred category=quick; model=openai/gpt-5.6-luna; reasoning=low; fallback_policy=openai-default-with-alt-fallback.", + "[MODEL ROUTING] Preferred category=quick; model=openai/gpt-6-luna; reasoning=low; fallback_policy=openai-default-with-alt-fallback.", "[TOOL SURFACE] subagent=explore; allowed=read,list,glob,grep; denied=bash,write,edit,webfetch,task,todowrite,todoread.", "", "[SESSION FLOW] parent_session_id=session-parent; trace_id=trace-fixed", @@ -82,8 +82,8 @@ test("agent-model-resolver keeps routing metadata out of the provider prompt", a ].join("\n") const legacyOverhead = legacyPrompt.length - callerPrompt.length const resolverOverhead = prompt.length - callerPrompt.length - assert.equal(legacyOverhead, 497) - assert.equal(legacyOverhead - resolverOverhead, 465) + assert.equal(legacyOverhead, 495) + assert.equal(legacyOverhead - resolverOverhead, 463) assert.equal(output.metadata?.gateway?.delegation?.subagentType, "explore") assert.equal(output.metadata?.gateway?.delegation?.category, "quick") assert.equal(output.metadata?.gateway?.delegation?.traceId, "trace-fixed") @@ -124,7 +124,7 @@ test("agent-model-resolver removes legacy provider context across reroutes", asy "Scout repository patterns", ].join("\n"), prompt: [ - "[MODEL ROUTING] Preferred category=quick; model=openai/gpt-5.6-luna; reasoning=low; fallback_policy=openai-default-with-alt-fallback.", + "[MODEL ROUTING] Preferred category=quick; model=openai/gpt-6-luna; reasoning=low; fallback_policy=openai-default-with-alt-fallback.", "[DELEGATION ROUTER] inferred subagent_type=explore from delegation intent.", "[TOOL SURFACE] subagent=explore; allowed=read,list,glob,grep; denied=bash,write,edit,webfetch,task,todowrite,todoread.", "[SESSION FLOW] parent_session_id=session-parent; trace_id=trace-reroute", @@ -264,7 +264,7 @@ test("agent-model-resolver emits metadata-first routing telemetry", { concurrenc assert.equal(resolved.tool_surface_injected, "false") assert.equal(resolved.tool_policy_source, "agent_spec") assert.equal(resolved.recommended_category, "quick") - assert.equal(resolved.model, "openai/gpt-5.6-luna") + assert.equal(resolved.model, "openai/gpt-6-luna") assert.equal(resolved.reasoning, "low") assert.equal(resolved.route_source, "explicit_subagent_type") assert.equal( diff --git a/plugin/gateway-core/test/provider-model-budget-enforcer-hook.test.mjs b/plugin/gateway-core/test/provider-model-budget-enforcer-hook.test.mjs index 6338c0b0..d848a14a 100644 --- a/plugin/gateway-core/test/provider-model-budget-enforcer-hook.test.mjs +++ b/plugin/gateway-core/test/provider-model-budget-enforcer-hook.test.mjs @@ -124,7 +124,7 @@ test("provider-model-budget-enforcer honors explicit category override and deep ) assert.equal(reservation?.category, "deep") - assert.equal(reservation?.model, "openai/gpt-5.6-sol") + assert.equal(reservation?.model, "openai/gpt-6.1-sol") } finally { if (previousAudit === undefined) { delete process.env.MY_OPENCODE_GATEWAY_EVENT_AUDIT diff --git a/plugin/gateway-core/test/routing-profiles-shared.test.mjs b/plugin/gateway-core/test/routing-profiles-shared.test.mjs index cebea92a..604f03e8 100644 --- a/plugin/gateway-core/test/routing-profiles-shared.test.mjs +++ b/plugin/gateway-core/test/routing-profiles-shared.test.mjs @@ -7,19 +7,19 @@ import { routingModelForCategory, } from "../dist/hooks/shared/routing-profiles.js" -test("routing profiles use the intended GPT-5.6 tiers", () => { - assert.equal(routingModelForCategory("quick"), "openai/gpt-5.6-luna") +test("routing profiles use the intended GPT-6 tiers", () => { + assert.equal(routingModelForCategory("quick"), "openai/gpt-6-luna") assert.equal(routingModelForCategory("balanced"), "openai/gpt-5.6-terra") - assert.equal(routingModelForCategory("deep"), "openai/gpt-5.6-sol") - assert.equal(routingModelForCategory("critical"), "openai/gpt-5.6-sol") + assert.equal(routingModelForCategory("deep"), "openai/gpt-6.1-sol") + assert.equal(routingModelForCategory("critical"), "openai/gpt-6.1-sol") assert.equal(routingModelForCategory("visual"), "openai/gpt-5.6-terra") assert.equal(routingModelForCategory("writing"), "openai/gpt-5.6-terra") }) -test("routing downgrade policy moves between GPT-5.6 tiers", () => { +test("routing downgrade policy moves between GPT-6 tiers", () => { assert.equal(downgradeRoutingCategory("critical"), "balanced") assert.equal(downgradeRoutingCategory("deep"), "balanced") - assert.equal(downgradeRoutingModel("openai/gpt-5.6-sol", "critical"), "openai/gpt-5.6-terra") - assert.equal(downgradeRoutingModel("openai/gpt-5.6-terra", "balanced"), "openai/gpt-5.6-luna") + assert.equal(downgradeRoutingModel("openai/gpt-6.1-sol", "critical"), "openai/gpt-5.6-terra") + assert.equal(downgradeRoutingModel("openai/gpt-5.6-terra", "balanced"), "openai/gpt-6-luna") assert.equal(downgradeRoutingModel("openai/gpt-5.6-terra", "writing"), "openai/gpt-5.6-terra") }) diff --git a/plugin/gateway-core/test/session-recovery-hook.test.mjs b/plugin/gateway-core/test/session-recovery-hook.test.mjs index 81e554dc..cdb24f28 100644 --- a/plugin/gateway-core/test/session-recovery-hook.test.mjs +++ b/plugin/gateway-core/test/session-recovery-hook.test.mjs @@ -1288,7 +1288,7 @@ test("session-recovery downgrades repeated provider header timeouts to a lighter info: { role: "user", agent: "build", - model: { providerID: "openai", modelID: "gpt-5.6-sol" }, + model: { providerID: "openai", modelID: "gpt-6.1-sol" }, }, }, ],