CodeWiki icon indicating copy to clipboard operation
CodeWiki copied to clipboard

API connectivity test faild despite positive validation

Open rschillerpcg opened this issue 1 year ago • 2 comments

Hello,

when trying to validate the setup, the API connectivity test fails without any suitable info:

codewiki config validate  --verbose

Validating configuration...

[1/5] Checking configuration file...
      Path: /Users/raphael/.codewiki/config.json
      ✓ File exists
      ✓ Valid JSON format

[2/5] Checking API key...
      Storage: system keychain
      ✓ API key retrieved
      ✓ Length: 108 characters

[3/5] Checking base URL...
      URL: https://api.anthropic.com
      ✓ Valid HTTPS URL

[4/5] Checking model configuration...
      Main model: claude-sonnet-4-5
      Cluster model: claude-sonnet-4-5
      ✓ Models configured
✗ API connectivity test failed

API key is valid and correctly set.

rschillerpcg avatar Dec 01 '25 10:12 rschillerpcg

same

bing5tui3 avatar Dec 02 '25 06:12 bing5tui3

Our current check only validates the API key format, not that it actually works against the endpoint.

Please make sure your active api_key and base_url are correctly configured, then try this quick test to confirm your setup:

from openai import OpenAI

client = OpenAI(
    base_url=<YOUR_BASE_URL>,
    api_key=<YOUR_API_KEY>
)

for model in client.models.list():
    print(model.id)

If this script runs successfully and lists models, the connectivity validation in codewiki config validate should also pass.

anhnh2002 avatar Dec 02 '25 10:12 anhnh2002