Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Fix Anthropic serialization bug. #1338

Merged
merged 1 commit into from
Apr 4, 2025
Merged
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 src/codegate/types/anthropic/_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def acompletion(request, api_key, base_url):
"accept": "application/json",
"content-type": "application/json",
}
payload = request.json(exclude_defaults=True)
payload = request.model_dump_json(exclude_none=True, exclude_unset=True)

if os.getenv("CODEGATE_DEBUG_ANTHROPIC") is not None:
print(payload)
Expand Down
Loading