CodeWiki icon indicating copy to clipboard operation
CodeWiki copied to clipboard

API connectivity test failed

Open simoroma opened this issue 10 months ago • 4 comments

I tried many different options for the configuration:

codewiki config set \
  --api-key YOUR_API_KEY \
  --base-url https://api.anthropic.com \
  --main-model claude-sonnet-4 \
  --cluster-model claude-sonnet-4 \
  --fallback-model glm-4p5

But codewiki config validate always fails at the API connection test.

I tried to change a few parameters, including claude-sonnet-4-5-latest, but nothing worked. What am I doing wrong?

simoroma avatar Jan 13 '26 15:01 simoroma

I didn't manage to make it work with Anthropic. But I managed with OpenAI

codewiki config set \
  --api-key <KEY> \
  --base-url https://api.openai.com/v1 \
  --main-model gpt-5.2 \
  --cluster-model gpt-5.2

simoroma avatar Jan 14 '26 08:01 simoroma

Hey just in case anyone has any issues with this. I got Anthropic to work with the url https://api.anthropic.com/v1. When running the codewiki validate command I still got the API Connection test failure but the generate command worked. The only other issue I had was the fallback-model I couldn't change. Even if I set a fallback-model it always used glm-4p5. Oh, the other thing that i found was the models for anthropic in the api docs, I had to use the full model like claude-sonnet-4-5-20250909 something like that. Good luck

charue808 avatar Jan 15 '26 04:01 charue808

Fixed in commit 36c93c2 — config validate now uses Anthropic SDK for native Anthropic endpoints.

bdqnghi avatar Apr 04 '26 05:04 bdqnghi

Fixed in 36c93c2. config validate now uses the Anthropic SDK when the base URL contains api.anthropic.com, so validation works correctly with native Anthropic endpoints.

bdqnghi avatar Apr 04 '26 06:04 bdqnghi