Skip to content

feat: add WanAPI as a built-in provider - #3

Open
ZXYZZP wants to merge 1 commit into
maxgfr:mainfrom
ZXYZZP:feat/add-wanapi-provider
Open

feat: add WanAPI as a built-in provider#3
ZXYZZP wants to merge 1 commit into
maxgfr:mainfrom
ZXYZZP:feat/add-wanapi-provider

Conversation

@ZXYZZP

@ZXYZZP ZXYZZP commented Jul 19, 2026

Copy link
Copy Markdown

What

Adds WanAPI (wanapi.ai) as a built-in provider, following the same pattern as the existing gateway entries (openrouter / deepseek).

WanAPI exposes an Anthropic-compatible Messages API endpoint that works with Claude Code out of the box via ANTHROPIC_BASE_URL=https://api.wanapis.com. It's a multi-model gateway (GPT / Claude / Gemini / DeepSeek + image/video) on one key and one balance.

Changes (data-only, no code)

  • config.template + the inline fallback template in ccs — add a [wanapi] block, placed just before [custom] so it doesn't reorder any existing provider.
  • README.md providers table — add the wanapi row.
  • test.sh — add an assertion that ccs list shows wanapi.

Default models

Mapped to the three Claude Code tiers using WanAPI's current catalog IDs:

Tier Model
main / sonnet claude-sonnet-4-6
opus claude-opus-4-8
haiku claude-haiku-4-5-20251001

Testing

Per CONTRIBUTING.md:

  • sh -n ccs / sh -n test.sh — clean (POSIX sh, no bashisms)
  • ./ccs help && ./ccs listwanapi shows in the list
  • ./test.sh101/101 passed (100 existing + the new wanapi assertion)
  • Functional check: ccs use wanapiccs env exports
    ANTHROPIC_BASE_URL=https://api.wanapis.com and the opus/sonnet/haiku tier vars correctly.

Disclosure

I operate WanAPI. Happy to adjust the default model IDs, naming, or placement — or drop the README/test bits if you'd prefer a more minimal diff. Thanks for the tool!

WanAPI (https://wanapi.ai) exposes an Anthropic-compatible Messages API
endpoint that works with Claude Code via
ANTHROPIC_BASE_URL=https://api.wanapis.com.

- config.template and the inline fallback template in `ccs`: add a
  [wanapi] block, with sonnet/opus/haiku tiers mapped to
  claude-sonnet-4-6 / claude-opus-4-8 / claude-haiku-4-5-20251001
- README providers table: add the wanapi row
- test.sh: assert `ccs list` shows wanapi

Data-only, no code changes; follows the existing gateway pattern
(openrouter/deepseek). `./ccs help && ./ccs list` and `./test.sh`
pass (101/101).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant