[BUG]

Resolved 💬 2 comments Opened Mar 4, 2026 by liuyuess Closed Mar 11, 2026

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?

No connected db error when configuring custom open-source model in settings.json (works with env vars)

I configured Claude Code to connect to a self-hosted open-source model deployed on a remote server, and tried to send basic prompts (e.g., "hello") to test the connection.

What Should Happen?

1.When setting model configuration via temporary environment variables (e.g., export ANTHROPIC_BASE_URL=***), Claude Code works normally and can interact with the model without errors.
2.When adding the same configuration to settings.json (see config below) and restarting Claude Code, any prompt triggers the error:
API Error: 400 {"error":{"message":"No connected db.","type":"no_db_connection"}}
3.The error persists even if I remove all other configurations except the model endpoint/key in settings.json.

Error Messages/Logs

API Error: 400 {"error":{"message":"No connected db.","type":"no_db_connection"}}

Steps to Reproduce

1.Deploy qwen3-code open-source model on remote server
2.Working scenario: Set temporary environment variables and start Claude Code
export ANTHROPIC_BASE_URL=*
export ANTHROPIC_AUTH_TOKEN=
*
export ANTHROPIC_MODEL=***
claude
→ No error, model responds normally.

3.Error scenario: Add the same config to ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "*",
"ANTHROPIC_AUTH_TOKEN": "
*",
"ANTHROPIC_MODEL": "**"
}
}
4.Restart Claude Code and send any prompt → No connected db error appears.

Claude Model

Other

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.63 (Claude Code)

Claude Code Version

2.1.63 (Claude Code)

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗