You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue using the Anthropic API's image-processing capabilities through your gateway. While direct API calls to Anthropic work correctly, requests routed through the gateway fail to process the image data.
Here are the details:
Gateway version: The latest version installed via npx
{"id":"msg_01MtiR433bzLRRGz5hDYx9q3","object":"chat_completion","created":1727957242,"model":"claude-3-5-sonnet-20240620","provider":"anthropic","choices":[{"message":{"role":"assistant","content":"I apologize, but I don't see any image in our conversation. You haven't uploaded or shared an image with me yet. If you'd like me to analyze an image, please upload one and I'll be happy to describe what I see in it."},"index":0,"logprobs":null,"finish_reason":"end_turn"}],"usage":{"prompt_tokens":14,"completion_tokens":56,"total_tokens":70}}
As you can see, the response from the gateway indicates that no image was provided, despite the image data being included in the request body.
Could you please advise on whether image processing is supported through the gateway, and if so, what might be causing this issue? Any guidance on how to resolve this would be greatly appreciated.
Thank you for your time and assistance.
Best regards,
Zhao
The text was updated successfully, but these errors were encountered:
Hey @hongyi-zhao - The gateway provides an unified interface so that users can request all AI model providers using a single API signature. This unified signature is OpenAI request schema. So the request that you make should be in OpenAI compatible format. Here is an example to use anthropic vision models:
Dear portkey-ai/gateway maintainers,
I'm encountering an issue using the Anthropic API's image-processing capabilities through your gateway. While direct API calls to Anthropic work correctly, requests routed through the gateway fail to process the image data.
Here are the details:
The complete test script is as follows:
The result of the above script is as follows:
As you can see, the response from the gateway indicates that no image was provided, despite the image data being included in the request body.
When making the same request directly to the Anthropic API (https://api.anthropic.com/v1/messages), it works correctly and the image is processed.
Could you please advise on whether image processing is supported through the gateway, and if so, what might be causing this issue? Any guidance on how to resolve this would be greatly appreciated.
Thank you for your time and assistance.
Best regards,
Zhao
The text was updated successfully, but these errors were encountered: