Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# Adding a name here grants both powers. Add people who know this codebase well
# enough to say no.

* @davidmckayv @guidovizoso @tylerslaton @MikeRyanDev @mxmzb
* @davidmckayv @guidovizoso @tylerslaton @MikeRyanDev @mxmzb @dustywusty @samjulien
6 changes: 5 additions & 1 deletion agent-ag2/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ def test_an_anthropic_key_uses_the_official_endpoint_when_compose_sets_a_blank_u

async def respond(transport, request):
body = json.loads(request.content)
seen.append((str(request.url), request.headers.get("x-api-key"), body["model"]))
# Anthropic's SDK sends the key as `x-api-key` up to 1.x and as `Authorization: Bearer` from
# 2.x; either is the key reaching Anthropic, which is what this test is about.
bearer = request.headers.get("authorization") or ""
key = request.headers.get("x-api-key") or bearer.removeprefix("Bearer ") or None
seen.append((str(request.url), key, body["model"]))
return httpx2.Response(
200,
request=request,
Expand Down
Loading