Passing provider-specific kwargs — custom headers, org IDs, API versions #82
Unanswered
gregorymazur26
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Some OpenAI API features require custom headers (e.g.,
OpenAI-Organization,OpenAI-Project). Anthropic hasanthropic-betaheaders for features like prompt caching. Azure OpenAI needsapi-versionin the URL.How does LLMix handle provider-specific kwargs that don't map to the common config schema?
Our current workaround:
Does
provider_kwargs(or equivalent) exist? If so:api_versionandazure_endpointhere?We're also interested in response header access. OpenAI returns
x-ratelimit-remaining-tokenswhich would be useful for the AIMD semaphore to read directly rather than waiting for 429s. Is there a hook to inspect response headers?All reactions