Skip to content

test(aikit): Anthropic e2e model matrix, with the fixes it found - #42

Merged
sanchitrk merged 3 commits into
devfrom
fix-test-cov-anthropic
Sep 30, 2026
Merged

sanchitrk merged 3 commits into
devfrom
fix-test-cov-anthropic

Conversation

@sanchitrk

Copy link
Copy Markdown
Contributor

Summary

Runs every Anthropic e2e suite against a model matrix and fixes the bugs those live runs surfaced. Stacked on #41 (OpenAI + Codex matrix), whose two commits are included here; the changelog covers both.

Matrix (test/utils/llm.ts): claude-sonnet-4-6, claude-sonnet-5, claude-sonnet-5-5, claude-opus-4-6, claude-opus-4-8, claude-opus-5-5, claude-fable-5-1, then the 4.5 generation claude-sonnet-4-5-20250929, claude-haiku-4-5-20251001.

Anthropic requests send no reasoning by default (exercising the thinking-off path) and high for thinking and multi-turn. Sonnet 5, Sonnet 5.5 and Fable use max in thinking tests: on short prompts they skip thinking below max (confirmed against the raw API).

Anthropic is added to the thinking-level, overflow, handoff and cache suites. Handoff covers model switches plus Anthropic → OpenAI, OpenAI → Anthropic and Codex → Anthropic; caching checks a write then a read for both short and long retention. xhigh.e2e.test.ts is removed; the thinking-level suite covers it.

Fixes

Issue Fix
Every plain request to Sonnet 5.5, Opus 5.5 and Fable 5.1 failed: aikit sent thinking: {type: "disabled"}, which they reject Catalog marks thinking-off unsupported; disabledProviderOptions respects it for Anthropic
xhigh/max never offered on 4.7/4.8, Sonnet/Opus 5.x, Fable; max missing on 4.6 Live-verified levels in modelgen.ts
Sonnet 4.5 listed at 1M context; the direct API limit is 200k (1M needs a beta header) 200k in modelgen.ts
Codex call|item tool IDs fail Anthropic's ^[a-zA-Z0-9_-]+$ Normalise for Anthropic targets in transform.ts; valid IDs pass through unchanged

Test plan

  • vp check, vp run typecheck
  • pnpm test (246 unit)
  • vp test test/e2e -t "OpenAI|Anthropic" (705 live tests across OpenAI, Codex and Anthropic)

Regenerate the gitignored catalog before running the e2e suites:

pnpm --filter @codeworksh/aikit cli modelgen ../../models.gen.json

🤖 Generated with Claude Code

sanchitrk and others added 3 commits September 30, 2026 17:41
… handling

- modelgen: live-verified thinking levels for gpt-5.4 through gpt-6 (no
  minimal; max only on gpt-5.6/gpt-6; none on Codex gpt-5.5/5.6-luna/6-luna)
  and add Codex gpt-6-luna
- bump @ai-sdk/openai to 4.0.81 so gpt-6-luna accepts reasoning "none"
- floor the context-clamped max tokens at 16 so an overflowing prompt
  surfaces as an overflow instead of an invalid max_output_tokens
- normalize Codex call|item tool call IDs for OpenAI targets (64-char cap)
- classify in-stream StreamProviderError like APICallError

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every OpenAI suite runs on gpt-6-luna through gpt-5.4-nano and every Codex
suite on gpt-6-luna, gpt-5.6-luna and gpt-5.5. Adds thinking-level, context
overflow, handoff and prompt-cache suites.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ID handoff

- modelgen: live-verified Anthropic levels (max on 4.6; xhigh and max on
  4.7/4.8, Sonnet/Opus 5 and Fable 5; 5.5 and Fable cannot disable
  thinking) and Sonnet 4.5's 200k direct-API window
- skip `thinking: {type: "disabled"}` for Claude models that reject it
- normalize Codex call|item tool call IDs for Anthropic targets, leaving
  already-valid IDs untouched
- run the Anthropic e2e suites across a model matrix and add Anthropic to
  the thinking-level, overflow, handoff and cache suites
- document the OpenAI and Anthropic changes in the changelog

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanchitrk
sanchitrk merged commit 7204ec0 into dev Sep 30, 2026
@sanchitrk
sanchitrk deleted the fix-test-cov-anthropic branch October 8, 2026 06:18
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