Skip to content

fix(gateway): adapt legacy thinking for aliased Claude models - #4913

Merged
reachjalil merged 1 commit into
devfrom
fix/adaptive-thinking-compatibility
Sep 11, 2026
Merged

reachjalil merged 1 commit into
devfrom
fix/adaptive-thinking-compatibility

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Problem

Gateway model aliases introduced in #4358 hide the upstream Claude identity from client-side thinking compatibility. The authorized upstream model is restored, but legacy thinking.type: enabled can still reach adaptive-only Claude models and be rejected.

Change

  • Normalize legacy thinking after resolving the authorized upstream model for Anthropic messages (including Vertex Anthropic).
  • Match the existing desktop compatibility policy for Claude major versions 5 and later: use adaptive thinking, remove the legacy token budget, and translate the budget to high/max effort unless effort is explicitly set.
  • Preserve output-format fields, disabled/absent/already-adaptive thinking, older Claude behavior, other protocols, and grant/credential selection.

Verification

Proof verdict: Incomplete — focused Gateway route tests pass; cold-boot testkit journey evidence and end-to-end desktop chat reproduction are deferred for this quick fix. No deployment performed.

Passed:

  • NODE_OPTIONS=--conditions=development pnpm --filter @openwork-ee/gateway exec tsx --test test/gateway.test.ts — 84 passed, 0 failed, 0 skipped; includes 36 new compatibility cases.
  • pnpm --dir evals typecheck — 414 evals source files, no errors.
  • git diff --check.

The new conversion cases failed against the unmodified implementation. An initial Vertex test expectation omitted URL encoding for dated model IDs; that assertion was corrected and the full Gateway test file then passed. Checks ran on the committed tree contents; rebase against refreshed dev was a no-op.

Deferred: extend and run evals/specs/inference-gateway-org-provider.test.ts with the alias plus legacy-thinking upstream witness assertion, and publish exact-head evidence. Required CI remains unchanged.

UI/UX impact

None — existing UI/UX preserved. No model-picker layout, labels, controls, or interaction changes.

@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics September 11, 2026 20:51 Inactive
@vercel

vercel Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

4 Skipped Deployments
Project Deployment Actions Updated
openwork-app Skipped Skipped Sep 11, 2026 8:51pm UTC
openwork-den Skipped Skipped Sep 11, 2026 8:51pm UTC
openwork-diagnostics Skipped Skipped Sep 11, 2026 8:51pm UTC
openwork-landing Skipped Skipped v0 Sep 11, 2026 8:51pm UTC

@vercel
vercel Bot temporarily deployed to Preview – openwork-landing September 11, 2026 20:51 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-app September 11, 2026 20:51 Inactive
@vercel
vercel Bot temporarily deployed to Preview – openwork-den September 11, 2026 20:51 Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (13509 ms), confidentiality-review (10728 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (0925225858e0eece476905e144636057970e910b). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit 0925225858e0eece476905e144636057970e910b · selected evidence

Open review report

@reachjalil
reachjalil merged commit 9226fb4 into dev Sep 11, 2026
33 checks passed

This branch was previously deployed

4 inactive deployments
Preview – openwork-den — 09252258 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-app — 09252258 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-diagnostics — 09252258 Deployed Sep 11, 2026 by vercel[bot]
Preview – openwork-landing — 09252258 Deployed Sep 11, 2026 by vercel[bot]
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