Skip to content

Read the Anthropic key from either header in the AG2 test - #859

Open
davidmckayv wants to merge 1 commit into
mainfrom
david/ag2-pass-provider-key
Open

davidmckayv wants to merge 1 commit into
mainfrom
david/ag2-pass-provider-key

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

Every pull request's "python harness regressions" job started failing today on test_an_anthropic_key_uses_the_official_endpoint_when_compose_sets_a_blank_url. The AG2 harness pins nothing, and CI now installs Anthropic's SDK 2.3.0, which sends the key as Authorization: Bearer instead of x-api-key. The agent's key still reaches Anthropic; the test only looked for the old header.

The test now reads the key from either header. Verified with the AG2 suite on three installs: ag2 1.2.1 + anthropic 1.17.0, ag2 1.2.2 + anthropic 1.17.0, and ag2 1.2.2 + anthropic 2.3.0 (all 10 pass; the last failed before this change).

Anthropic's SDK 2.3.0, which CI now installs for the AG2 harness, sends the
key as Authorization: Bearer instead of x-api-key. The agent's key still
reaches Anthropic; the test only looked for the old header, so it failed on
every pull request. It now accepts either, and passes with Anthropic's SDK
1.17.0 and 2.3.0 alike.

This branch has not been deployed

No deployments
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