Repository navigation
test: pin the ACP and claude-haiku-5-5 beta combination in the gateway - #138
Merged
Merged
Conversation
The docs describe the pinned CLI, started through Agent SDK 0.3.303 and ACP adapter 0.94.0, declaring the direct run's betas plus the SDK's two additions. No test covered that union, only each half. Also record the SDK and adapter in the allowlist's observation note.
wanglongan587
approved these changes
Oct 22, 2026
wanglongan587
left a comment
Collaborator
There was a problem hiding this comment.
审查版本:head 1214b13757528c4f16127b9a5d9040ed3d53f78b(base 6a5c6710,即当前 upstream/main)。结论:Approve,无阻塞发现。
改动范围
只有两个文件,没有生产行为变化:
internal/modelgateway/anthropic.go:观测来源注释补上 Agent SDK 0.3.303 / ACP adapter 0.94.0。internal/modelgateway/anthropic_test.go:把直连 Claude 的 8 项头提为pinnedClaudeHaikuBetas,新增TestPinnedClaudeACPHaikuBetaCombination,钉住文档描述的 ACP +claude-haiku-5-5组合(8 + 2 = 10 项)。
核对
- 与
docs/models/model-gateway.md:51-58一致:ACP 查询追加structured-outputs-2025-12-15、thinking-display-updates-2026-08-18,claude-haiku-5-5首个请求带per-turn-control-2026-07-01。新用例把这 10 项发到/runtime/anthropic/v1/messages?beta=true,断言上游收到的Anthropic-Beta和 query 原样不变。 - 原
TestPinnedCLIClaudeModelBetas/claude的字符串换成同一个常量,内容逐字节相同,行为不变。 go test -count=1 -run 'TestPinned' -v ./internal/modelgateway/:三个用例全部通过。- 反向验证:临时从
claudeBetaHeaders删掉per-turn-control-2026-07-01,新用例以status=400 calls=0失败;恢复后通过。TestPinnedCLIClaudeModelBetas/claude同样失败,两个用例都保护该值。 gofmt -l internal/modelgateway无输出;go vet ./internal/modelgateway/无输出;git diff --check干净。- 全包
go test -count=1 -p 1 ./internal/modelgateway/:与 base6a5c6710相同,只有 3 个egress_test.go用例在本 Windows 环境因staticAddresses地址策略失败,与改动无关。PR 的check、packages、integration-0..3全部 SUCCESS。 - 与当前
upstream/main(6a5c6710)的merge-tree干净;base 之后 main 未改动internal/modelgateway/、docs/models/。
ADR
不涉及 ADR 状态变化。specs upstream/main(2dce673)没有列举这份 beta 白名单的 ADR,两份相关 ADR 仍是 approved;第 4 项的 specs 落地 PR 另行处理。
非阻塞
- 组合头由已抓到的两组拼出,不是端到端抓取,测试注释已写明它只证明网关接受并原样转发并集,不证明客户端真实顺序。第 3 项正式验收拿到真实 ACP 首请求后,若内容或顺序与此不同,应回来同步这条用例。
test-cases/cloud/model-access/personal-agent-configurations.md的“受限协议兼容”仍是Missing,按 owner 安排在 #370 第 4 项的 specs PR 里更新。
本结论只覆盖 cloud#138 这一交付,不代表 circus#370 第 2–4 项已完成。
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-up to the review of #115 and #132. No production behavior change.
claude-haiku-5-5combination.docs/models/model-gateway.mdsays the pinned Claude Code 2.1.303, started through Agent SDK 0.3.303 / ACP adapter 0.94.0, declares the direct run's betas plusstructured-outputs-2025-12-15andthinking-display-updates-2026-08-18. Existing tests covered each half separately (TestPinnedCLIClaudeModelBetasandTestPinnedClaudeAgentSDKCapabilities), never the 10-item union.TestPinnedClaudeACPHaikuBetaCombinationforwards it over?beta=trueand asserts it arrives unchanged. The direct-run header is hoisted intopinnedClaudeHaikuBetasso both tests share one definition.anthropic.go's observation note, and say that an SDK or adapter upgrade must also exercise its requests.The new test's header is composed from the two captured sets, not captured end to end, so it pins that the gateway accepts and forwards the union, not the client's header order. The test comment says so.
ADR
Not related to any ADR status change.
Evidence
GOMAXPROCS=2 go test -count=1 -p 1 ./internal/modelgateway/passes;go vetandgofmtare clean.per-turn-control-2026-07-01fromclaudeBetaHeadersmakes the new test fail withstatus=400 calls=0.Refs ora-space/circus#370