Bring Your Own Model (OpenAI) Header Issues #411
Unanswered
David Vohradsky (davidvoh9)
asked this question in
Ask Me Anything (AMA)
Replies: 2 comments 1 reply
|
If you have access to input processing / middleware in your gateway setup, you can strip the offending header before it hits OpenAI: # Example: strip Foundry-injected headers before forwarding
headers_to_strip = ["project-id", "x-ms-client-request-id"]
clean_headers = {
k: v for k, v in request.headers.items()
if k.lower() not in [h.lower() for h in headers_to_strip]
}It's a workaround that shouldn't be necessary but it unblocks you while the Unified API rollout sorts this out. |
0 replies
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.
When I set up an Admin Connected Model pointing to my own OpenAI account (using my API-key), Foundry adds a project-id header which OpenAI rejects.
Same happens if I try to create an API Gateway that also points to the OpenAI account.
Is this supported, I'm reading Unified API is still being rolled out (which I'm guessing is the fix)
The other fix is to strip the extra header in input processing.
Seems to be an overly complex way to do a simple external model call.
All reactions