Skip to content

Add CoderPlan provider - #2995

Open
onepaperbox wants to merge 2 commits into
anomalyco:devfrom
onepaperbox:add-coderplan
Open

Add CoderPlan provider#2995
onepaperbox wants to merge 2 commits into
anomalyco:devfrom
onepaperbox:add-coderplan

Conversation

@onepaperbox

Copy link
Copy Markdown

Resubmits #1973, which was closed by the stale bot (not rejected on merits) after the logo was added too late. This refreshes it against current dev with the logo included and pricing updated to current published rates.

CoderPlan — an OpenAI-compatible LLM API relay for the China market (Alipay/WeChat payment, ¥10 minimum top-up, Hong Kong/Singapore nodes). API at https://api.coderplan.ai/v1.

7 models with current per-token pricing (USD/M input/output, sourced from coderplan.ai/pricing on 2026-07-02):

Model Input Output
anthropic/claude-opus-4-7 0.68 3.42
anthropic/claude-sonnet-4-6 0.41 2.05
anthropic/claude-haiku-4-5 0.14 0.68
openai/gpt-5.5 0.34 2.05
openai/gpt-5.4 0.17 1.03
deepseek/deepseek-v4-pro 0.19 0.38
deepseek/deepseek-v4-flash 0.02 0.04

Each model uses base_model to inherit capabilities from the canonical entry, with CoderPlan-specific [cost] and reasoning_options mirroring the upstream providers (Claude toggle + budget_tokens; GPT-5 effort; DeepSeek toggle + effort). logo.svg is included.

bun validate passes locally. Open to any schema/positioning feedback — happy to adjust model selection, reasoning_options granularity, or add cache pricing if you can point me at how other relays publish it (CoderPlan's pricing page lists only input/output today).

@oskarkocol

Copy link
Copy Markdown
Contributor

One pattern I noticed across providers: the svg logos use currentColor and are effectively mono. Your's has colors.

@onepaperbox

Copy link
Copy Markdown
Author

Good catch @oskarkocol — converted the logo to monochrome currentColor (dropped the gradient background + colored fills), so it follows the same theme-adaptive pattern as the other providers. Pushed in onepaperbox/models.dev:add-coderplan.

@rekram1-node

Copy link
Copy Markdown
Collaborator

AUTOMATED REVIEW: This PR cannot be merged as-is. Provider scaffolding (logo, base_model, OpenAI-compatible provider.toml) is fine, but reasoning_options do not match upstream model surfaces and are not evidenced for CoderPlan specifically.

Blockers — reasoning_options

PR body claims options “mirror the upstream providers.” They do not. Compare to current native entries and Anthropic/OpenAI/DeepSeek docs.

Claude (all three wrong)

Model PR claim Native / correct shape
anthropic/claude-opus-4-7 toggle + budget_tokens min 1024 max 63999 effort only: low, medium, high, xhigh, max. No budget_tokens. Anthropic rejects thinking.type = "enabled" / budget_tokens on Opus 4.7+ (adaptive thinking + effort).
anthropic/claude-sonnet-4-6 toggle + budget_tokens max 63999 effort: low, medium, high, max and optional budget_tokens with min = 1024 only (no verified max in native). Missing effort entirely.
anthropic/claude-haiku-4-5 toggle + budget_tokens max 63999 budget_tokens only (min 1024). No toggle on native Anthropic.

Specific failures:

  1. budget_tokens on Opus 4.7 is invalid for the current Anthropic API generation.
  2. Blanket max = 63_999 is unverified — do not invent bounds; omit max unless proven.
  3. toggle on Claude models is not how native Anthropic is modeled here. Do not add toggle unless CoderPlan documents/reproduces an explicit on/off request path for that model ID (e.g. thinking.type enabled/disabled) and that path still works for that generation.

OpenAI GPT (incomplete)

Model PR claim Native
openai/gpt-5.4 effort low/medium/high none, low, medium, high, xhigh
openai/gpt-5.5 same same

Missing none (disable/off path) and xhigh. Do not shrink the enum without CoderPlan-specific rejection evidence.

DeepSeek (wrong effort values + incomplete)

Model PR claim Native DeepSeek
deepseek/deepseek-v4-pro toggle + effort high/xhigh toggle + effort high/max (not xhigh); interleaved.field = "reasoning_content"
deepseek/deepseek-v4-flash toggle + effort high/xhigh same effort values; also needs interleaved.field = "reasoning_content"

xhigh is not the DeepSeek V4 effort surface; use max.

Blockers — provider evidence

CoderPlan public docs cover tool setup (Base URL / API key) only. There is no citation that CoderPlan forwards:

  • Anthropic thinking / output_config.effort
  • OpenAI reasoning_effort / Responses reasoning.effort
  • DeepSeek thinking.type / reasoning_effort

reasoning_options are provider capabilities, not copy-paste from model cards. For a relay:

  • Prefer options proven on CoderPlan’s OpenAI- and Anthropic-compatible endpoints.
  • If passthrough is unverified, use reasoning_options = [] (model reasons; no verified control), not invented toggle/budget/effort sets.
  • Copying a generic “Claude extended thinking” template onto Opus 4.7 is especially wrong.

Other issues (should fix before merge)

  1. Pricing looks stale vs current catalog (https://coderplan.ai/pricing, CNY). Convert to USD with rate/date note. e.g. DeepSeek V4 Flash is far above the PR’s $0.02 / $0.04 at current listed CNY rates.
  2. Catalog incomplete relative to the live pricing page (many GPT/Claude/Gemini/Kimi/etc. models not included — fine to ship a subset, but listed costs/IDs must match what CoderPlan actually serves today).
  3. No wire-format comments / PR evidence for how each control is sent (required when claiming toggle/effort/budget).

Required before merge

  1. Rewrite every model’s reasoning_options to match that model’s real control surface — or [] if CoderPlan passthrough is unproven.
  2. Remove budget_tokens from Opus 4.7; remove unverified max; fix Sonnet/Haiku to native shapes (or CoderPlan-tested equivalents).
  3. Fix GPT effort values to include verified levels (at least document why none/xhigh were dropped if rejected by CoderPlan).
  4. Fix DeepSeek effort to high/max; add interleaved for Flash if Pro has it.
  5. Re-source USD costs from current pricing with conversion note.
  6. Cite CoderPlan (or live API tests) in the PR body for each claimed control.
  7. Re-run bun validate.

novaforge61 added a commit to novaforge61/models.dev that referenced this pull request Aug 19, 2026
- reasoning_options mirror each base_model's native shape
- pricing re-sourced from live CNY catalog (2026-08-18, 1 USD = 7.15 CNY)
- logo: monochrome currentColor
- bun run validate passes
@novaforge61 novaforge61 mentioned this pull request Aug 19, 2026
2 tasks
@novaforge61

Copy link
Copy Markdown

The original fork account behind this PR is no longer available to push updates, so I'm resubmitting the work (with the review feedback fully addressed) as a fresh PR from a new fork:

#5035

Changes in the new PR:

  • reasoning_options mirror each base_model's native shape (per the review table — no invented budget_tokens on Opus 4.7+, DeepSeek high/max + interleaved, GPT including none/xhigh)
  • Pricing re-sourced from the live CNY catalog (2026-08-18, 1 USD = 7.15 CNY)
  • Monochrome currentColor logo kept

Feel free to close this one in favor of the new PR. Apologies for the churn, and thanks for the detailed automated review — it made the resubmission much better.

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.

4 participants