[BUG] VS Code extension ignores third-party provider environment variables during authentication check
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 AuthManager checks for authentication before reading environment variables from .claude/settings.json or claudeCode.environmentVariables. When using Microsoft Foundry with CLAUDE_CODE_USE_FOUNDRY=1 and related variables, the extension still prompts for login. The terminal version works correctly with the same configuration.
What Should Happen?
Extension should check for third-party provider environment variables before requiring authentication
Error Messages/Logs
Extension reports "No authentication found" and blocks usage
Steps to Reproduce
Create setting in the .claude/settings.json
{
"env": {
"CLAUDE_CODE_USE_FOUNDRY": "1",
"CLAUDE_CODE_SKIP_AUTH_LOGIN": "1",
"ANTHROPIC_FOUNDRY_RESOURCE": "xxxx",
"ANTHROPIC_FOUNDRY_API_KEY": "yyyyy",
"ANTHROPIC_DEFAULT_SONNET_MODEL":"claude-sonnet-4-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL":"claude-haiku-4-5"
}
}
Launch the extension
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
extension version 2.0.53
Platform
Other
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
This works if you launch vs code with a script:
#!/bin/bash
export CLAUDE_CODE_USE_FOUNDRY=1
export CLAUDE_CODE_SKIP_AUTH_LOGIN=1
export ANTHROPIC_FOUNDRY_RESOURCE=xxxx
export ANTHROPIC_FOUNDRY_API_KEY=yyyy
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5
code "$@"
EOF
12 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Might be related, as I know the #11937 post I shared, indicated I got it working with CLI locally, but not in Azure Pipelines/CI, so following in case there's some related issue that in different tooling or environment is causing it to fail.
hello, any updates on this?
Agree, any updates on this? I have spent a whole lot of time trying to get this work, but I am starting to think this isn't actually a feature anymore.
At least the selected model id should be clearly displayed somewhere like what it does in CLI, currently it's very confused which one is selected. I have to ask the model who you are.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I left claude extension.
I'm now using GPT codex extension instead.
The bug is probably still happening.
The idea was to use anthropic/vertex API in the claude extension, however, the setup gas never worked.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
Even though this issue was closed as “not planned”, is there any chance this behavior could be revisited in the future roadmap?
This problem still seems to affect users in similar scenarios, and it would be helpful to know whether a fix or redesign is explicitly out of scope or just not prioritized at the moment.
Any clarification on long-term plans would be greatly appreciated.
Configuration Guide: Using Ollama Local Models with Claude Code VSCode Extension
Summary
This issue documents the working configuration for using Ollama-hosted local models with the Claude Code VSCode Extension, addressing the setup challenges reported in #20271 and #12361.
Working Configuration
To use Ollama local models, split the configuration between two files:
1.
.vscode/settings.json- Model Selection2.
.claude/settings.local.json- Ollama EnvironmentPrerequisites
``
bash
``ollama serve
``
bash
``ollama pull kimi-k2.5:latest
``
bash
``curl http://localhost:11434/api/tags
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.