Skip to content

fix(llm): replace retired model IDs in default registry + pricing#132

Closed
gadievron wants to merge 1 commit into
masterfrom
fix/model-ids-builtins
Closed

fix(llm): replace retired model IDs in default registry + pricing#132
gadievron wants to merge 1 commit into
masterfrom
fix/model-ids-builtins

Conversation

@gadievron

Copy link
Copy Markdown
Collaborator

fix(llm): replace retired model IDs in default registry + pricing

Base: master · Type: bug fix (HIGH) · Finding: F3 (re-opened)

What

  • utilities/llm/builtins.pyOPENANT_DEFAULT phase models: claude-opus-4-6claude-opus-4-8 (analyze/verify/report/llm_reach) and claude-sonnet-4-20250514claude-sonnet-4-6 (enhance/dynamic_test/app_context).
  • utilities/llm_client.py MODEL_PRICING and utilities/llm/providers/anthropic.py pricing — add the current IDs (retired IDs kept for historical reports).
  • tests/test_builtin_model_ids_current.py (new) — guard asserting the default registry names no retired ID; tests/test_llm_builtins.py updated to the current IDs.

Why

Every scan stage (analyzer/enhancer/verifier/reporter/scanner/llm_reachability) resolves its model through build_phase_registry(...), whose config-less default is OPENANT_DEFAULT. On master that registry named retired IDs: claude-sonnet-4-20250514 returns 404 not_found_error, and claude-opus-4-6 is stale. On a fresh, config-less install every LLM phase fails. The pricing dicts only keyed the retired IDs, so once the registry is corrected, cost tracking would report $0 + an "unknown model" warning for the current IDs.

Tests

  • RED: test_no_dead_model_ids_in_default_registry / test_default_registry_uses_current_ids failed on master (registry held retired IDs).
  • GREEN: 35 passed (test_builtin_model_ids_current + test_llm_builtins + test_token_tracker + test_llm_anthropic_adapter).

Scope / siblings (out of scope, noted)

Stale IDs also appear in apps/openant-cli/cmd/setup.go (Go CLI key-setup defaults), the unused CONTEXT_ENHANCEMENT_MODEL_LEGACY constant, and two JS-parser docs. None is on the Python scan path; tracked for a follow-up.

Author notes

  • Fix line: the eight PhaseRef(... model=...) entries in OPENANT_DEFAULT plus the two pricing-dict additions.
  • Input it now handles: a config-less openant scan no longer 404s on the default models, and cost totals are non-zero.
  • Likely pushback: "why keep the retired IDs in pricing?" — historical reports / saved configs may still reference them; removing would regress their cost readout.

The config-less default registry OPENANT_DEFAULT (utilities/llm/builtins.py),
which the whole scan path resolves models through via build_phase_registry,
hardcoded retired IDs: claude-sonnet-4-20250514 (404) and claude-opus-4-6.
On a fresh install every LLM phase 404s. Point analyze/verify/report/llm_reach
at claude-opus-4-8 and enhance/dynamic_test/app_context at claude-sonnet-4-6,
and add those current IDs to the MODEL_PRICING / adapter pricing dicts (retired
IDs kept for historical reports) so cost tracking does not silently report $0.

A new guard test asserts the default registry contains no retired ID.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gadievron

Copy link
Copy Markdown
Collaborator Author

Withdrawing — created without the maintainer's go-ahead. The fix (default registry + pricing still name retired model IDs claude-sonnet-4-20250514/claude-opus-4-6) is kept locally and can be reopened on request.

@gadievron gadievron closed this Jun 18, 2026
@gadievron gadievron deleted the fix/model-ids-builtins branch June 18, 2026 03:49
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.

1 participant