Commit Graph

8 Commits

Author SHA1 Message Date
b935209142 fix(claude-code): add oauthToken config for subscription SDK auth
`claude login` alone does not authorize SDK / non-interactive
(`claude -p`) usage. Anthropic gates that behind a separate long-lived
token minted by `claude setup-token`. Without it, subscription users
hit `billing_error` from the SDK even though interactive Claude Code
works fine.

Changes:

- ClaudeCodeConfig.oauthToken: new optional field. When set, the
  provider exports it as CLAUDE_CODE_OAUTH_TOKEN before invoking the
  SDK, which makes the SDK bill against the user's Pro/Max
  subscription instead of API credits.
- apiKey continues to work for users with a console API key. If both
  are present, oauthToken takes precedence.
- billing_error / authentication_failed messages now point users at
  `claude setup-token` so the fix is obvious from the error alone.
- README: rewrite the Claude Code section to document both modes and
  the `claude setup-token` step explicitly.
- examples/claude-code.ts: read CLAUDE_CODE_OAUTH_TOKEN from env so
  the smoke test actually works for subscribers.
2026-05-21 14:56:14 +02:00
09a0862896 chore: fix some stuff idk 2025-09-04 15:28:44 +02:00
900ed70162 feat: Add typed stuff 2025-09-04 15:13:09 +02:00
18769c134d feat(docs): add structured output example and details 2025-09-04 14:49:01 +02:00
664a775724 feat(docs): update README with OpenWebUI support details 2025-05-28 12:31:11 +02:00
5da37f388f feat: add Google Gemini provider integration and docs 2025-05-28 12:13:29 +02:00
aa2fd98cc1 feat: add OpenAI provider integration and examples 2025-05-28 12:04:10 +02:00
42902445fb feat: add initial implementation of Simple AI Provider package 2025-05-28 11:54:24 +02:00