When building with Anthropic’s Agent SDK (not the client SDK, that works fine) I set the ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL to my Foundry URL and access token. I can see by proxying the requests API calls to my Foundry stack and to Anthropics APIs, for example:
[REQUEST URL] CONNECT <REDACTED>.palantirfoundry.com:443 HTTP/1.1
[HEADER] host: <REDACTED>.palantirfoundry.com
[HEADER] connection: close
[REQUEST URL] CONNECT api.anthropic.com:443 HTTP/1.1
[HEADER] host: api.anthropic.com:443
[HEADER] proxy-connection: close
The fill stack URL provided in the is:
<REDACTED>.palantirfoundry.com/api/v2/llm/proxy/anthropic
The token is a valid token create with the OSDK. I also tried a personal access token. But I keep gettin 401 authentication failed.
attempt =
1
error =
'authentication_failed'
error_status =
401
max_retries =
10
retry_delay_ms =
536.6033701315846
session_id = <REDACTED>
subtype =
'api_retry'
type =
'system'
uuid = <REDACTED>
Is the use of the Agents SDK supported?