fix: carry provider capability in dedicated header

This commit is contained in:
2026-07-11 15:02:51 +08:00
parent 63c86322de
commit 3087132083
5 changed files with 23 additions and 7 deletions
+2 -1
View File
@@ -54,6 +54,7 @@ describe("run-scoped provider proxy", () => {
ANTHROPIC_BASE_URL: expect.stringMatching(/^http:\/\/127\.0\.0\.1:\d+$/),
ANTHROPIC_AUTH_TOKEN: expect.any(String),
ANTHROPIC_API_KEY: expect.any(String),
ANTHROPIC_CUSTOM_HEADERS: expect.stringMatching(/^X-CPH-Run-Capability: /),
});
expect(lease.sdkEnv.ANTHROPIC_AUTH_TOKEN).toBe(lease.sdkEnv.ANTHROPIC_API_KEY);
@@ -108,7 +109,7 @@ describe("run-scoped provider proxy", () => {
expect(diagnostics).toEqual([{
code: "provider_proxy_unauthorized",
category: "authorization",
authShape: { bearerLength: 0, apiKeyLength: 0, expectedLength: 43 },
authShape: { bearerLength: 0, apiKeyLength: 0, customCapabilityLength: 0, expectedLength: 43 },
}]);
});