mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-06 21:13:43 +00:00
1169be44b5
When using the generateContent endpoint with non-Google providers like github_copilot, the extra_headers from model config were not being forwarded to the underlying litellm.completion/acompletion calls. This caused providers requiring custom headers (e.g., Editor-Version for GitHub Copilot authentication) to reject requests with errors like "missing Editor-Version header for IDE auth". Changes: - Forward extra_headers in _prepare_completion_kwargs() handler - Pass extra_headers explicitly to adapter in generate_content() - Pass extra_headers explicitly to adapter in agenerate_content_stream() - Pass extra_headers explicitly to adapter in generate_content_stream() - Add tests for extra_headers forwarding behavior - Update existing test to expect extra_headers in passed fields Co-authored-by: Claude <noreply@anthropic.com>
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.