Repository navigation
test(model-gateway): restore SDK beta coverage and stop counting the allowlist - #132
Merged
Merged
Conversation
Replacing the SDK capability test with the per-CLI table dropped the only direct check that structured-outputs-2025-12-15 and thinking-display-updates-2026-08-18, which the Agent SDK adds on top of the pinned CLI, are forwarded over ?beta=true with bearer auth. Restore it.
…CLI request The header in the table was recorded from the bundled CLI run with the adapter's alias and model environment, not through the ACP adapter, so it does not include the Agent SDK's additions.
… a count The READMEs said the allowlist had nine tokens; it now has twelve. Name the claudeBetaHeaders table so the docs do not drift again when it changes.
wanglongan587
approved these changes
Oct 21, 2026
wanglongan587
left a comment
Collaborator
There was a problem hiding this comment.
审查版本:head a6227991d22bf8aba3020d439d275ed2dca605bc(base 3366278,对照 upstream/main acec2f9)。结论:Approve,无阻塞发现。
逐条核对 owner 交回的三项
- SDK beta 组合回归:恢复的
TestPinnedClaudeAgentSDKCapabilities与 #115 合并前的版本(3366278^)逐行一致(23 行),确为原样恢复,与TestPinnedCLIClaudeModelBetas并存不重复。反向验证:分别从claudeBetaHeaders删掉structured-outputs-2025-12-15或thinking-display-updates-2026-08-18,该用例都以status=400 calls=0失败,恢复后通过 —— 两个值现在都有直接回归覆盖(PR 描述只写了后者,前者同样成立)。 - 注释:
anthropic_test.go:22改为直连 CLI 录制,与 #115 描述的证据(bundled aarch64 CLI 指向本地 recorder、使用 adapter 的别名和模型环境)一致;表中 Claude 头确实不含 SDK 追加的两项,与下方 SDK 用例的分工现在从注释即可读出。 - README:中英文都不再固定数量,改为引用
anthropic.go的claudeBetaHeaders;代码表当前 12 项,仓库内没有残留的“九项/nine”计数,也没有第二份复制这份 token 列表的文档。
边界与验证
- 3 个改动文件都是交付物(测试 + 包内 README),无过程记录;
git diff --check干净,gofmt -l无输出,go vet无输出。 - 本地检出
a622799(detached worktree):TestPinnedClaudeAgentSDKCapabilities、TestPinnedCLIClaudeModelBetas(claude/opencode)、TestClaudeMessagesQueryHeadersAndToolStream、TestClaudeProtocolRejectsUnknownSurface、TestFrozenAnthropicDiscoveryUsesOnlyCurrentGrant全部通过。 - 全包
go test -count=1 ./internal/modelgateway/仍有 3 个egress_test.go用例在本 Windows 环境因staticAddresses地址策略失败;已在 base3366278复现同样三个失败,与本次改动无关。PR 的check为 SUCCESS。 - ADR:PR 描述写明不涉及 ADR 状态变化;specs(
upstream/main0a100a6)没有列举该白名单的 ADR,说法成立,不需要规格落地 PR。 - 合并:与当前
upstream/main(acec2f9)本地merge-tree干净;base 之后 main 未改动internal/modelgateway/、docs/models/。
本结论只覆盖 cloud#132 这一交付,不代替 circus#370 第 2–4 项(发布开关、真实供应商验收、ADR 落地)。
2 of 18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups from the review of #115. No production code changes.
TestPinnedClaudeAgentSDKCapabilitieswith the per-CLI table. That dropped the only direct check that the Agent SDK's additions (structured-outputs-2025-12-15,thinking-display-updates-2026-08-18) are forwarded over?beta=truewith bearer auth. The test is restored verbatim from before fix(model-gateway): allow the betas the pinned Claude and OpenCode CLIs send for Claude models #115.claudeBetaHeaderstable inanthropic.go.Evidence
GOMAXPROCS=2 go test -count=1 -p 1 ./internal/modelgateway/passes, andgo vetis clean.thinking-display-updates-2026-08-18fromclaudeBetaHeadersmakes the restored test fail withstatus=400 calls=0.Not related to any ADR status change.
Refs ora-space/circus#370
Merge Danger
Door: two-way
Blast Radius: model-gateway tests and docs only