#Debugging Anthropic proxy endpoint requests

1 messages · Page 1 of 1 (latest)

rich nymph
#

Howdy - I'm trying to debug requests going to an Anthropic endpoint I setup. They're going through a proxy, but I think I have everything configured correctly... I can see the below in the debug logs but am not sure what the issues is from this. I'm not a node dev so am having trouble seeing how the request is constructed in the code to trace is further that way (tried building the project and breakpointing through but couldn't get it running).

Curious if this communicates an issue to those more familiar with the code, or if there's a way for me to get more granular logging on the requests to see what's going on. I can curl the endpoint with below example and it works fine. I know the proxy connectivity is good because I can hit OpenAI endpoints through it, but it's failing for my Anthropic one.

Greatly appreciate any guidance!

#

Curl example (works):

curl --location 'https://myproxy.com/anthropic/v1/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxx' \
--data '{
   "model": "anthropic.claude-3-sonnet",
   "max_tokens": 1024,
   "messages": [
        {"role": "user", "content": "hi"
        }
    ],
   "temperature": 0.7,
   "stream": true
}'