mirror of https://github.com/garrytan/gstack.git
ClaudeAdapter.available() treated Claude auth as present only when ~/.claude/.credentials.json exists or ANTHROPIC_API_KEY is set. On the default macOS Claude Code subscription install the credential lives in the login Keychain, not that file, so available() returned NOT READY for a provider whose run() path (`claude -p --output-format json`) authenticates fine via the same subscription session. model-benchmark and the LLM-judge path silently dropped the claude provider for that whole population. An absent ~/.claude/.credentials.json on macOS is not evidence of missing auth. Keep the positive signals (creds file or ANTHROPIC_API_KEY) as a fast yes, but on darwin be optimistic when the binary resolves and defer the real auth decision to run(), which already classifies a genuinely logged-out state as an `auth` error. Non-macOS keeps the strict file/key check, where ~/.claude/.credentials.json is the actual credential store. Adds test/claude-adapter-available.test.ts covering: macOS no-creds-no-key now available; non-macOS no-creds-no-key still not available; API key and a present creds file available on any platform; unresolvable binary still reported before the auth sniff. The macOS case fails on main and passes with this change. Fixes #1890 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| claude.ts | ||
| gemini.ts | ||
| gpt.ts | ||
| types.ts | ||