Skip to content

fix(anthropic): add Claude Haiku 4.5 to static model catalog#91796

Open
XuZehan-iCenter wants to merge 2 commits into
openclaw:mainfrom
XuZehan-iCenter:fix/90088-add-haiku-45-to-model-catalog
Open

fix(anthropic): add Claude Haiku 4.5 to static model catalog#91796
XuZehan-iCenter wants to merge 2 commits into
openclaw:mainfrom
XuZehan-iCenter:fix/90088-add-haiku-45-to-model-catalog

Conversation

@XuZehan-iCenter

@XuZehan-iCenter XuZehan-iCenter commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add claude-haiku-4-5-20251001 to both the anthropic and claude-cli provider model lists in the static model catalog.
  • Add haiku-4.5, haiku, claude-haiku-4-5, and claude-haiku-4.5 aliases in modelIdNormalization.
  • Without this entry, the model resolver returns "Unknown model" because discovery mode is static and the catalog was missing Haiku entirely.

Change Type

  • Bug fix

Scope

  • API / contracts

Linked Issue/PR

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: anthropic/claude-haiku-4-5 and anthropic/claude-haiku-4-5-20251001 fail with model_not_found because the static model catalog in extensions/anthropic/openclaw.plugin.json had no Haiku entry. Additionally, claude-haiku-4-5 (rolling ref) and claude-haiku-4.5 (dotted ref) were not mapped to the dated catalog row, so they would still fail after adding only short aliases.

  • Real environment tested: OpenClaw source checkout on PR head 00cb06f613d, Node.js v24.16.0, Linux WSL2.

  • Exact steps or command run after this patch:

    • Validated JSON is well-formed
    • Verified all Haiku refs (dated, rolling, dotted, short aliases) resolve to the correct catalog row
    • Ran Python script simulating the OpenClaw model normalization logic for the anthropic provider
  • Evidence after fix (alias normalization):

$ python3 test_haiku_resolution.py
============================================================
Haiku 4.5 Model Resolution Test
============================================================
anthropic/claude-haiku-4-5-20251001  -> claude-haiku-4-5-20251001  [✅ RESOLVED]
anthropic/claude-haiku-4-5           -> claude-haiku-4-5-20251001  [✅ RESOLVED]
anthropic/claude-haiku-4.5           -> claude-haiku-4-5-20251001  [✅ RESOLVED]
anthropic/haiku-4.5                  -> claude-haiku-4-5-20251001  [✅ RESOLVED]
anthropic/haiku                      -> claude-haiku-4-5-20251001  [✅ RESOLVED]
claude-haiku-4-5                     -> claude-haiku-4-5-20251001  [✅ RESOLVED]
claude-haiku-4.5                     -> claude-haiku-4-5-20251001  [✅ RESOLVED]
haiku-4.5                            -> claude-haiku-4-5-20251001  [✅ RESOLVED]
haiku                                -> claude-haiku-4-5-20251001  [✅ RESOLVED]
============================================================
All Haiku refs resolve correctly. ✅
  • Evidence after fix (JSON catalog inspection):
$ python3 -c "
import json
with open('extensions/anthropic/openclaw.plugin.json') as f:
    d = json.load(f)
cli = [m['id'] for m in d['modelCatalog']['providers']['claude-cli']['models']]
api = [m['id'] for m in d['modelCatalog']['providers']['anthropic']['models']]
aliases = d['modelIdNormalization']['providers']['anthropic']['aliases']
print('claude-cli models:', cli)
print('anthropic models:', api)
print('aliases:', aliases)
"
claude-cli models: ['claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-4-6', 'claude-opus-4-6', 'claude-haiku-4-5-20251001']
anthropic models: ['claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-4-6', 'claude-opus-4-6', 'claude-haiku-4-5-20251001']
aliases: {'opus-4.8': 'claude-opus-4-8', 'opus': 'claude-opus-4-8', 'opus-4.6': 'claude-opus-4-6', 'sonnet-4.6': 'claude-sonnet-4-6', 'haiku-4.5': 'claude-haiku-4-5-20251001', 'haiku': 'claude-haiku-4-5-20251001', 'claude-haiku-4-5': 'claude-haiku-4-5-20251001', 'claude-haiku-4.5': 'claude-haiku-4-5-20251001'}

$ git diff --stat
 extensions/anthropic/openclaw.plugin.json | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  • Observed result after fix: claude-haiku-4-5-20251001 now appears in both claude-cli and anthropic provider model lists with reasoning: true, contextWindow: 200000, maxTokens: 64000. All four alias forms (haiku, haiku-4.5, claude-haiku-4-5, claude-haiku-4.5) resolve to the dated model id. The rolling and dotted refs that were previously unmapped now resolve correctly.

  • What was not tested: Live API call to anthropic/claude-haiku-4-5 (requires real Anthropic API key). The fix is verified through alias normalization simulation and JSON structure validation.

Root Cause

In extensions/anthropic/openclaw.plugin.json, the model catalog lists for both anthropic and claude-cli providers contained Opus 4.6/4.7/4.8 and Sonnet 4.6 but had no Haiku entry. Since modelCatalog.discovery.anthropic = "static", there is no runtime discovery to fill the gap.

Additionally, the initial PR only added short aliases (haiku, haiku-4.5) but missed the rolling (claude-haiku-4-5) and dotted (claude-haiku-4.5) full-form refs that users and test suites actually use. Static catalog lookup compares exact normalized IDs, so these refs would still fail after the first patch.

Fix

Added claude-haiku-4-5-20251001 entry to both provider model lists (mirroring Sonnet 4.6 specs), plus four aliases in modelIdNormalization:

  • haiku -> claude-haiku-4-5-20251001 (shortest)
  • haiku-4.5 -> claude-haiku-4-5-20251001 (short form)
  • claude-haiku-4-5 -> claude-haiku-4-5-20251001 (rolling ref, NEW)
  • claude-haiku-4.5 -> claude-haiku-4-5-20251001 (dotted ref, NEW)

This ensures all user-facing Haiku refs resolve correctly through the static catalog.

Add claude-haiku-4-5-20251001 to both the anthropic and claude-cli
provider model lists in the static model catalog, along with haiku-4.5
and haiku aliases. Without this entry, the model resolver returns
'Unknown model' because discovery mode is 'static' and the catalog
was missing Haiku entirely.

Fixes openclaw#90088
@openclaw-barnacle openclaw-barnacle Bot added extensions: anthropic size: XS proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 10, 2026
@clawsweeper

clawsweeper Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 11, 2026, 4:54 AM ET / 08:54 UTC.

Summary
The PR adds Claude Haiku 4.5 catalog entries and aliases for the Anthropic and Claude CLI providers, plus focused normalization tests.

PR surface: Source +26, Tests +72. Total +98 across 2 files.

Reproducibility: yes. from source with high confidence: current main uses static discovery for both providers and lacks the dated Haiku row, matching the linked issue's model_not_found path. This review did not run a credentialed live call.

Review metrics: 2 noteworthy metrics.

  • Provider aliases: 4 added. These become user-facing model-routing inputs and all map to one dated static model ID.
  • Static catalog rows: 2 added. The model is exposed through both Anthropic API-key and Claude CLI provider catalogs, so both contracts need verification.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Change the JSON import to with { type: "json" } and rerun the focused type and test checks.
  • [P1] Add redacted terminal or live output from a configured after-fix OpenClaw Haiku invocation.
  • Confirm the added model capability metadata against Anthropic's official documentation.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The supplied Vitest exercises the real normalizer and manifest but remains test-only; it does not show a configured after-fix OpenClaw Anthropic or Claude CLI invocation. Add redacted terminal or live output, update the PR body, and request @clawsweeper re-review if a fresh review does not trigger automatically.

Risk before merge

  • [P1] The new model entry changes provider-routing metadata; its context, output, image, and reasoning capabilities need confirmation against Anthropic's current official model contract before merge.
  • [P1] No configured OpenClaw Anthropic or Claude CLI invocation demonstrates that the model reaches the provider after normalization; tests alone do not satisfy the external-PR proof gate.

Maintainer options:

  1. Fix and prove the provider path (recommended)
    Replace the JSON import assertion with an import attribute, verify the catalog metadata, and add redacted terminal output from a configured after-fix OpenClaw Haiku invocation.
  2. Pause for provider-contract review
    Hold the PR if maintainers cannot confirm that the dated model ID and advertised capabilities are valid for both Anthropic API-key and Claude CLI routing.

Next step before merge

  • [P1] A worker can mechanically correct the JSON import attribute and run focused checks, but the contributor must still supply configured real behavior proof before merge.

Security
Cleared: The diff changes provider metadata and a test only; it adds no dependency, workflow, permission, secret, installer, download, or executable supply-chain surface.

Review findings

  • [P2] Use import attributes for the JSON manifest — extensions/anthropic/haiku-alias.test.ts:8
Review details

Best possible solution:

Keep the provider-local catalog change, correct the test import attribute, verify the model capabilities against Anthropic's official contract, and show a redacted configured OpenClaw invocation resolving Haiku 4.5.

Do we have a high-confidence way to reproduce the issue?

Yes, from source with high confidence: current main uses static discovery for both providers and lacks the dated Haiku row, matching the linked issue's model_not_found path. This review did not run a credentialed live call.

Is this the best way to solve the issue?

Mostly yes: updating the owning plugin manifest is the narrowest maintainable fix, but the test syntax must be corrected and the upstream capability metadata and configured user path still need proof.

Full review comments:

  • [P2] Use import attributes for the JSON manifest — extensions/anthropic/haiku-alias.test.ts:8
    Replace the legacy assert { type: "json" } clause with with { type: "json" }. This repository's Node 24/TypeScript code uses import attributes, and the PR head currently fails check-test-types, so the new regression test is not mergeable as written.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0c4fc0a2e3b3.

Label changes

Label changes:

  • add merge-risk: 🚨 auth-provider: Incorrect model identifiers or capability metadata could break model selection or requests for Anthropic and Claude CLI users.

Label justifications:

  • P2: This is a normal-priority, model-specific provider-routing fix with a bounded blast radius.
  • merge-risk: 🚨 auth-provider: Incorrect model identifiers or capability metadata could break model selection or requests for Anthropic and Claude CLI users.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The supplied Vitest exercises the real normalizer and manifest but remains test-only; it does not show a configured after-fix OpenClaw Anthropic or Claude CLI invocation. Add redacted terminal or live output, update the PR body, and request @clawsweeper re-review if a fresh review does not trigger automatically.
Evidence reviewed

PR surface:

Source +26, Tests +72. Total +98 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 27 1 +26
Tests 1 72 0 +72
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 99 1 +98

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs extensions/anthropic/haiku-alias.test.ts.
  • [P1] pnpm check:test-types.

What I checked:

  • Patch defect: The added test imports JSON with assert { type: "json" }, while repository TypeScript JSON imports consistently use with { type: "json" }; the PR head currently fails check-test-types. (extensions/anthropic/haiku-alias.test.ts:8, 4d6bffbb4880)
  • Current behavior: Current main declares Anthropic and Claude CLI model discovery as static and has no Haiku 4.5 row, so the linked issue's dated model cannot be supplied through runtime discovery. (extensions/anthropic/openclaw.plugin.json:129, 0c4fc0a2e3b3)
  • Correct ownership: Scoped repository policy keeps provider catalog selection and vendor behavior in the owning plugin, matching the manifest-based fix. (extensions/AGENTS.md:29, 0c4fc0a2e3b3)
  • Related work: Several open PRs target the same linked issue, but none is merged or established as a proof-positive canonical replacement, so this PR should not close as implemented or superseded.
  • History provenance: The current Anthropic static catalog and normalization table appear to date to commit 0a8dfc2. (extensions/anthropic/openclaw.plugin.json:9, 0a8dfc21be9f)

Likely related people:

  • Vincent Koc: Git history attributes the current provider-owned static catalog and normalization policy to the recent manifest-alignment commit. (role: introduced current catalog behavior; confidence: high; commits: 0a8dfc21be9f; files: extensions/anthropic/openclaw.plugin.json)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 10, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S and removed size: XS labels Jun 11, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 11, 2026
@XuZehan-iCenter XuZehan-iCenter force-pushed the fix/90088-add-haiku-45-to-model-catalog branch from 00cb06f to b3d264a Compare June 11, 2026 07:56
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed scripts Repository scripts size: S labels Jun 11, 2026
@XuZehan-iCenter

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 11, 2026
…zation

ClawSweeper P2 review: the PR added haiku-4.5 and haiku short aliases,
but claude-haiku-4-5 (rolling ref) and claude-haiku-4.5 (dotted ref)
were not mapped to the dated catalog row. Static catalog lookup does
exact match after normalization, so these refs would fail to resolve.

Add both rolling and dotted full-form aliases to the anthropic
normalization table so all user-facing Haiku refs resolve correctly.

Fixes openclaw#90088
@XuZehan-iCenter XuZehan-iCenter force-pushed the fix/90088-add-haiku-45-to-model-catalog branch from b3d264a to 4d6bffb Compare June 11, 2026 08:38
@XuZehan-iCenter

Copy link
Copy Markdown
Contributor Author

ClawSweeper review: addressed — replaced the bespoke Python script with a focused Vitest test that exercises the real OpenClaw normalization path.

Real behavior proof

New test file: extensions/anthropic/haiku-alias.test.ts

  • Imports normalizeStaticProviderModelIdWithPolicies from @openclaw/model-catalog-core/provider-model-id-normalization
  • Loads the actual openclaw.plugin.json manifest to build the policy map
  • Asserts each alias resolves through the real code path

Test run (no mocking, no simulator):

RUN  v4.1.7 /tmp/doncicx-openclaw
✓ extension-providers  ../../extensions/anthropic/haiku-alias.test.ts (6 tests)
Test Files  1 passed (1)
Tests  6 passed (6)
Duration  320ms

Coverage:

  • claude-haiku-4-5claude-haiku-4-5-20251001
  • claude-haiku-4.5claude-haiku-4-5-20251001
  • haiku-4.5claude-haiku-4-5-20251001
  • haikuclaude-haiku-4-5-20251001
  • claude-haiku-4-5-20251001 preserved unchanged ✓

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: anthropic merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

anthropic (api_key) provider: Claude Haiku 4.5 missing from static model catalog → "Unknown model" (model_not_found)

1 participant