Skip to content

fix(anthropic): preserve explicit Opus 4.5 routing and effort aliases - #16811

Merged
diegosouzapw merged 1 commit into
release/v3.8.52from
fix/16406-opus45-prefix-five-1016
Oct 17, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.52from
fix/16406-opus45-prefix-five-1016

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

An explicit anthropic/claude-opus-4.5 request lost its provider prefix in the cross-proxy alias table. Both model resolvers selected claude even when the only configured connection was an Anthropic API key. The qualified alias now retains anthropic and uses its dashed wire ID; the unprefixed legacy alias still maps to its existing dated snapshot.

Anthropic effort variants also checked the dotted base against model specs before canonicalization, so claude-opus-4.5-high remained an invalid wire ID. The known-base check now canonicalizes Anthropic aliases first, preserving other providers' guards. The original seven-ID routing regression no longer skips Opus 4.5.

This is the remaining catalog-ID portion of #16406, following #16425. The separate fallback consent/authorization/identity correction remains in #16810; this PR does not claim to resolve the entire issue independently.

Refs #16406.

Validation

Temporary SQLite with exactly one active Anthropic API-key connection; real core and application model resolvers, explicit-prefix parsing, bare legacy alias and dashed/effort controls:

RED on 0ac33d056f7bd670189e5d67d842042f3f2bd913: 4 failed / 1 passed
GREEN: 94 passed / 0 failed / 0 skipped / 0 cancelled (8 focused files)

The focused set includes the existing dotted-ID, Claude effort, Kiro alias, model parser and resolver tests. No authenticated upstream request or deployment was performed. Full-suite and global static validation remain pending in the maintainer integration train; this PR is Draft.

@diegosouzapw
diegosouzapw marked this pull request as ready for review October 17, 2026 02:13
@diegosouzapw
diegosouzapw merged commit 63d5e3e into release/v3.8.52 Oct 17, 2026
46 of 49 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

diegosouzapw added a commit that referenced this pull request Oct 18, 2026
…port, route-guard locale proof, parseModel alias, family-fallback consent (#17007)

* test(sse): align the parseModel cache-key expectation with the #16811 Opus 4.5 contract

#16811 made the provider-qualified `anthropic/claude-opus-4.5` alias keep its
`anthropic` prefix and resolve to the dashed wire ID (`claude-opus-4-5`), leaving
only the bare alias on the dated snapshot. It updated its own regression test but
not this sibling from #16341, which still expected `provider: null`,
`claude-opus-4-5-20251101`, `isAlias: true`. The compat on/off results still
differ, which is what the cache-key test is about.

Refs #15306

* test(docs): bound the route-guard locale proof by the current paragraph order

#16691 moved the deny-list test reference ahead of the regex companion constant in
docs/security/ROUTE_GUARD_TIERS.md; the mirrors followed, but this test (from
#16504) still searched for that reference AFTER `SPAWN_CAPABLE_PATTERN_ANCESTORS`
and reported "missing localized policy proof" for all 66 locales. The window now
runs from the Kiro auto-import deny-list entry to the regex companion and asserts
the deny-list proof inside it; all 66 mirrors pass and the English-fallback and
hash checks are unchanged.

Refs #15306

* fix(mcp): keep apiKeyPolicy and next/headers out of the MCP server bundle's import time

`git bisect` on tests/unit/build/mcp-bundle-startup.test.ts lands on #16810, which
made src/shared/utils/modelFallbackAuthorization.ts import `resolveEnforcedPolicyKey`
from apiKeyPolicy. That module is reached from open-sse (modelFamilyFallbackPolicy),
so the MCP server bundle started carrying apiKeyPolicy → apiAuth → `next/headers`
(esbuild hoists the external import; plain Node cannot resolve it) and, once that is
out of the way, an async init cycle around sse/services/auth that leaves the import
with an unsettled top-level await (exit 13). #16499 then opened a second path into
apiKeyPolicy through keyConnectionScope → comboTargetKeyPolicy on the embeddings
service.

Load the three edges lazily, at the call sites that are already async:
modelFallbackAuthorization and keyConnectionScope import apiKeyPolicy /
comboTargetKeyPolicy inside the functions that use them, and apiAuth imports
`next/headers` only when it actually falls back to the request cookie store. The
bundle imports again on Node 24 and the request paths are unchanged.

Refs #15306

* test(chat): opt the family-fallback effort cases into the #16810 cross-version consent

#16810 gated the internal cross-version family hop behind
`x-omniroute-allow-cross-version-fallback: true`; without it an empty-content
answer from claude-sonnet-4.6 is returned as 502 instead of being recovered on
claude-sonnet-4.5. The three "empty family fallback preserves only explicit
effort" cases (from #13720) exercise exactly that hop and never sent the header,
so they failed with `502 !== 200` after 24s. Send the opt-in; the effort
propagation they assert is unchanged.

Refs #15306
@diegosouzapw
diegosouzapw deleted the fix/16406-opus45-prefix-five-1016 branch October 18, 2026 23: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