claude-code
claude-code copied to clipboard
[BUG] Regression - Azure Foundry auth failing since 2.0.70
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The latest version of claude code fails to authenticate with Azure foundry it works in 2.0.62
What Should Happen?
claude should work
Error Messages/Logs
Invalid API key · Please run /login
Steps to Reproduce
- Update to latest version 2.0.72
- export keys for connecting to foundry
- observe errors when trying to connect to claude
- revert to 2.0.62
- everything works fine
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.62
Claude Code Version
N/A
Platform
Other
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
No response
What are the names of the environment variables you're setting for Foundry? When you submit a prompt, what error do you get?
Hi @ant-kurt I have the following set
# Claude Code + Azure AI Foundry configuration
CLAUDE_CODE_USE_FOUNDRY=1
# Your Foundry resource base URL
ANTHROPIC_FOUNDRY_RESOURCE=<redacted>
# API key from your Foundry deployment
ANTHROPIC_FOUNDRY_API_KEY=<redacted>
# Optional: default models for Claude Code
ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5
ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-5
ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-5
ANTHROPIC_MODEL=claude-haiku-4-5
When I downgrade: