Skip to content

fix(llm): default to claude-opus-5-5 from one owner; keep claude-opus-5 on the ladder - #1941

Merged
chaojhou merged 2 commits into
mainfrom
fix/default-claude-model-single-owner
Oct 16, 2026
Merged

chaojhou merged 2 commits into
mainfrom
fix/default-claude-model-single-owner

Conversation

@jiejingzhangamd

Copy link
Copy Markdown
Collaborator
  • Description: DEFAULT_CLAUDE_MODEL (common/llm_config.py) moves from claude-opus-5 to claude-opus-5-5, the current Opus (per the Claude model table: Opus 5 is still served but is the previous generation; 5.5 is the successor, $4/$20 vs $5/$25 per MTok). The literal was also repeated in agents/quantization/driver/runner.py, breakdown/reporters/llm_client.py (×3), orchestrator/scoring/proposal_scorer.py, and the --proposal-scorer-models help string; those now derive from the constant (the help renders %(default)s). _CLAUDE_ALLOWED_MODELS keeps claude-opus-5 as the second rung, so the catalog fallback ladder is 5-5 → 5 → 4-8 → 4-7 → 4-6, and an explicit --claude-model claude-opus-5 stays valid under INFERENCE_OPTIMIZER_ALLOW_CUSTOM_ORCH_MODEL=0. Docs (install, slurm, authentication, SKILL, troubleshooting), the setup skill's default option and install_kernel_tools.sh's shell fallback name the new default.
    Deliberately unchanged: assets/slurm/proxy.env.template keeps its pinned claude-opus-5 values (AMD gateway operators pin what their gateway serves; GEAK has no catalog fallback), only its ladder comment is updated; .env.template's commented "pin an older id" example.
    Opus 5.5 request-shape check: no forced tool_choice (any/tool) anywhere; temperature is only sent when a caller sets it, and the one caller that does is the OpenAI-protocol report client; KernelForge's _supports_adaptive_thinking parses claude-opus-5-5 as major 5 → adaptive thinking, never budget_tokens (now pinned by a test case).
  • Linked issue(s): Refs Default model 'claude-opus-5' is stale and scattered; setup offers no Codex backend despite README support #1936 (default model half; the Codex setup half is a separate PR)
  • Tests: updated the six tests that pinned the old literal as the default (test_agent_roles_and_policy ladder, test_proposal_scorer, test_reporters_llm_client, KernelForge test_resolve_and_cli, test_agent_env_contract, test_claude_resume, test_provider_registry); added claude-opus-5-5 to the adaptive-thinking cases. Tests that pass claude-opus-5 as an explicit input are unchanged. 93 test files touching the default / allowlist / scorer / report client / runner / parser / docs: 3616 passed; 13 fail identically on clean main in this environment (all in test_install_rocprof_compute.py, host profiler-install probes). ruff clean; bash -n on the installer; code-metrics PASSED.
    Live: an 8 h GLM-5.2 MXFP4 session ran its orchestration, critic and GEAK on claude-opus-5-5 (subscription auth, official endpoint).
  • Size/complexity triggers crossed: none.
  • If this simplifies or refactors: six hard-coded copies of the default model id are removed; one owner (DEFAULT_CLAUDE_MODEL) remains, plus the shell fallback in install_kernel_tools.sh, which cannot import it.
  • Observable effect: with no CLAUDE_MODEL / --claude-model, runs (orchestration, critic, report narrative, quantization agent, proposal scoring, GEAK fallback) now use claude-opus-5-5; setup offers Use default (claude-opus-5-5). Before, they used the previous-generation claude-opus-5. On a gateway without 5.5, preflight now prints WARNING — 'claude-opus-5-5' not in gateway catalog; falling back to 'claude-opus-5'.
  • Breaking changes: no; an operator who sets CLAUDE_MODEL=claude-opus-5 keeps it, including under the strict allowlist.
  • PR addresses single concern: yes (the default model and its single owner).
  • Root cause is upstream, ticket filed: no

🤖 Generated with Claude Code

…-5 on the ladder

The default Claude model was the previous-generation claude-opus-5, and it
was spelled out again in the quantization runner, the report client (three
times), the proposal-scorer defaults and the --proposal-scorer-models help
text, so a default change had to be found and repeated by hand.

DEFAULT_CLAUDE_MODEL is now claude-opus-5-5, the current Opus, and every
code-side default derives from it (the help text renders %(default)s).
claude-opus-5 stays in the allowlist as the second rung, so a gateway that
serves Opus 5 but not 5.5 falls back one generation, not two, and an
explicit --claude-model claude-opus-5 is still accepted under the strict
allowlist. Docs and the setup skill name the new default; the AMD proxy
template keeps its pinned ids, which an operator chooses for their gateway.

Refs #1936

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HktBcjPwjE7QgkA8MgKH6q
@jiejingzhangamd
jiejingzhangamd requested a review from a team as a code owner October 16, 2026 07:31
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Code metrics gate: PASSED

Judged: the 23 files this change touches. Files it does not touch never fail it; anything found there is listed under Outside this change for information.

Dimension Limit New Worse Baseline out of date Baseline entries vs base
Cyclomatic complexity fails > 20 0 0 0 72 +0
Cognitive complexity fails > 30 0 0 0 284 +0
Function length (lines) fails > 80 0 0 0 449 +0
Nested block depth fails > 5 0 0 0 27 +0
Module length (lines) warns > 800, fails > 1200 0 0 0 53 +0
Duplicated lines per file fails > 0 0 0 0 118 +0
Dead code (vulture) fails > 0 0 0 0 2 +0
Check Findings Effect
Comments 0
English only 0
Production code imports test code 0
Repeated literals 0
A1 Private name of another package 0
A8 Flag argument 0
A9 Tuple return 0
A10 Raw vocabulary comparison 0
A11 Hidden global write 0
A12 Pure forwarder 0
A12 Single-implementation abstraction 0

Module length warning: over 800 lines, within the 1200-line failure limit (not failing): 1

Module Lines Limit
src/hyperloom/inference_optimizer/cli/parser.py 1191 warns > 800

Already over at the base (backlog, not this change's): 1

Unit Dimension Base Now
src/hyperloom/inference_optimizer/cli/parser.py:176 _build_parser Function length (lines) 1017 1016
96 findings in files this change does not touch

Outside this change (informational): 96

Unit Dimension Baseline Now
src/hyperloom/orchestrator/enablement/recipe/projections.py project_launch_evidence Cognitive complexity absent 36
src/hyperloom/orchestrator/state/shared_state.py resolve_graded_comparison Cognitive complexity absent 34
src/hyperloom_kb/collect/mapping.py _experience Cognitive complexity absent 31
src/hyperloom_kb/schema.py FieldDeclaration.__post_init__ Cognitive complexity absent 32
src/kernelforge/cli/forge_loop_command.py _prepare_measurement_driver Cognitive complexity absent 36
src/kernelforge/cli/forge_loop_command.py _read_kb_warm_start Cognitive complexity absent 40
src/kernelforge/loop/runner.py IterationLoop._collect_session_candidate Cognitive complexity absent 44
src/kernelforge/loop/runner.py IterationLoop._rule_on_attempt Cognitive complexity absent 38
src/hyperloom_kb/tests/test_cli.py Duplicated lines per file absent 18
src/hyperloom_kb/tests/test_global_identity_and_pull.py Duplicated lines per file absent 13
src/hyperloom_kb/tests/test_local_state.py Duplicated lines per file absent 18
src/hyperloom/inference_optimizer/cli/__init__.py _reexport_session_environment Function length (lines) absent 112
src/hyperloom/inference_optimizer/cli/__init__.py _resolve_agent_lineup Function length (lines) absent 89
src/hyperloom/inference_optimizer/cli/__init__.py _resolve_run_topology Function length (lines) absent 92
src/hyperloom/inference_optimizer/cli/__init__.py _resume_session Function length (lines) absent 171
src/hyperloom/inference_optimizer/cli/__init__.py _seed_fresh_session Function length (lines) absent 183
src/hyperloom/inference_optimizer/multi_node/cli.py _restart_multinode Function length (lines) absent 107
src/hyperloom/inference_optimizer/multi_node/scripts/launch_multinode.py _build_parser Function length (lines) absent 84
src/hyperloom/inference_optimizer/multi_node/scripts/launch_multinode.py _spawn_rank_actors Function length (lines) absent 90
src/hyperloom_kb/http_service.py RequestHandler._dispatch Function length (lines) absent 91
src/hyperloom_kb/sync.py GlobalSync.pull Function length (lines) absent 86
src/kernelforge/cli/forge_loop_command.py _RunReporter.build_result Function length (lines) absent 91
src/kernelforge/cli/forge_loop_command.py _prepare_measurement_driver Function length (lines) absent 140
src/kernelforge/cli/forge_loop_command.py _read_kb_warm_start Function length (lines) absent 154
src/kernelforge/loop/knowledge_integration.py _measure_warmstart_field Function length (lines) absent 83

...and 71 more; the job log lists every row.

Verdict computed by the gate scripts in /home/runner/work/_temp/code-metrics-gate, not by this tree's copy.

Thresholds and sources: [tool.hyperloom.code_metrics] in pyproject.toml. Tools: complexipy 8.0.1, jscpd 5.4.1, ruff 0.16.2, vulture 2.16.

@chaojhou chaojhou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #1941 -- fix(llm): default to claude-opus-5-5 from one owner; keep claude-opus-5 on the ladder

What it does: moves DEFAULT_CLAUDE_MODEL (common/llm_config.py) from claude-opus-5 to claude-opus-5-5 and makes the copies that hard-coded the old id (quantization runner, the three report-client defaults, the proposal-scorer list and its --proposal-scorer-models help) derive from it; claude-opus-5 stays second on the strict allowlist ladder, so a gateway without 5.5 falls back to it and an explicit claude-opus-5 remains valid. Docs, the setup skill and the GEAK shell fallback name the new default.

Blocking issues: none

Checked: llm_config.py default and resolve path; credentials._CLAUDE_ALLOWED_MODELS; the --proposal-scorer-models default and help at parser.py:924-937; every remaining claude-opus-5 literal at head; model-id keyed logic (KernelForge adaptive-thinking parser, provider-reported cost in tracker/usage.py); docs naming the default | Ran: git grep over the head tree, gh api for checks and comments | Base: 7ff5758 | Head: bead7c2

@chaojhou
chaojhou merged commit 8f3e2ad into main Oct 16, 2026
40 checks passed
@chaojhou
chaojhou deleted the fix/default-claude-model-single-owner branch October 16, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants