Skip to content

test(model-gateway): restore SDK beta coverage and stop counting the allowlist - #132

Merged
EricWvi merged 3 commits into
ora-space:mainfrom
ObsisMc:docs/370-gateway-beta-followups
Oct 21, 2026
Merged

EricWvi merged 3 commits into
ora-space:mainfrom
ObsisMc:docs/370-gateway-beta-followups

Conversation

@ObsisMc

@ObsisMc ObsisMc commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-ups from the review of #115. No production code changes.

Evidence

  • GOMAXPROCS=2 go test -count=1 -p 1 ./internal/modelgateway/ passes, and go vet is clean.
  • Removing thinking-display-updates-2026-08-18 from claudeBetaHeaders makes the restored test fail with status=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

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 wanglongan587 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

审查版本:head a6227991d22bf8aba3020d439d275ed2dca605bc(base 3366278,对照 upstream/main acec2f9)。结论:Approve,无阻塞发现。

逐条核对 owner 交回的三项

  1. SDK beta 组合回归:恢复的 TestPinnedClaudeAgentSDKCapabilities 与 #115 合并前的版本(3366278^)逐行一致(23 行),确为原样恢复,与 TestPinnedCLIClaudeModelBetas 并存不重复。反向验证:分别从 claudeBetaHeaders 删掉 structured-outputs-2025-12-15 或 thinking-display-updates-2026-08-18,该用例都以 status=400 calls=0 失败,恢复后通过 —— 两个值现在都有直接回归覆盖(PR 描述只写了后者,前者同样成立)。
  2. 注释:anthropic_test.go:22 改为直连 CLI 录制,与 #115 描述的证据(bundled aarch64 CLI 指向本地 recorder、使用 adapter 的别名和模型环境)一致;表中 Claude 头确实不含 SDK 追加的两项,与下方 SDK 用例的分工现在从注释即可读出。
  3. 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 地址策略失败;已在 base 3366278 复现同样三个失败,与本次改动无关。PR 的 check 为 SUCCESS。
  • ADR:PR 描述写明不涉及 ADR 状态变化;specs(upstream/main 0a100a6)没有列举该白名单的 ADR,说法成立,不需要规格落地 PR。
  • 合并:与当前 upstream/main(acec2f9)本地 merge-tree 干净;base 之后 main 未改动 internal/modelgateway/、docs/models/。

本结论只覆盖 cloud#132 这一交付,不代替 circus#370 第 2–4 项(发布开关、真实供应商验收、ADR 落地)。

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.

3 participants