feat: add WanAPI as a built-in provider - #3
Open
ZXYZZP wants to merge 1 commit into
Open
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inccs— add a[wanapi]block, placed just before[custom]so it doesn't reorder any existing provider.README.mdproviders table — add thewanapirow.test.sh— add an assertion thatccs listshowswanapi.Default models
Mapped to the three Claude Code tiers using WanAPI's current catalog IDs:
claude-sonnet-4-6claude-opus-4-8claude-haiku-4-5-20251001Testing
Per
CONTRIBUTING.md:sh -n ccs/sh -n test.sh— clean (POSIX sh, no bashisms)./ccs help && ./ccs list—wanapishows in the list./test.sh— 101/101 passed (100 existing + the new wanapi assertion)ccs use wanapi→ccs envexportsANTHROPIC_BASE_URL=https://api.wanapis.comand 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!