Skip to content

Add CoderPlan provider - #5035

Open
novaforge61 wants to merge 3 commits into
anomalyco:devfrom
novaforge61:add-coderplan
Open

Add CoderPlan provider#5035
novaforge61 wants to merge 3 commits into
anomalyco:devfrom
novaforge61:add-coderplan

Conversation

@novaforge61

Copy link
Copy Markdown

Summary

Adds CoderPlan — a pay-as-you-go LLM API relay for coding CLIs (Claude Code / Codex CLI / Gemini CLI) with an OpenAI-compatible endpoint at https://api.coderplan.ai/v1.

Supersedes #2995 — the original author's fork account is no longer available to push fixes, so this PR resubmits with the automated review's feedback fully addressed:

  • reasoning_options now mirror each base_model's native shape in this repo (e.g. claude-opus-4-7effort: low/medium/high/xhigh/max without budget_tokens; DeepSeek V4 → toggle + high/max with interleaved.reasoning_content; GPT-5.x → none/low/medium/high/xhigh). Caveat: options mirror the native control surface because CoderPlan proxies the native API; per-level passthrough testing on CoderPlan's endpoint is pending — happy to trim to a provider-proven set if maintainers prefer.
  • Pricing re-sourced from the live CNY catalog at https://coderplan.ai/pricing (2026-08-18), converted at 1 USD = 7.15 CNY. All 7 model IDs confirmed live today.
  • Logo: monochrome currentColor (matching the earlier review note on Add CoderPlan provider #2995).

Validation

  • bun run validate passes locally (repo clone + these files)
  • All model IDs match the live pricing catalog (2026-08-18)

Models included (subset; more can follow)

Claude (Opus 4.7 / Sonnet 4.6 / Haiku 4.5), GPT (5.4 / 5.5), DeepSeek (V4 Pro / Flash)

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/coderplan/models/deepseek/deepseek-v4-flash.toml:8 - Check: DeepSeek V4 relay effort must match first-party lab baseline. Why: Flash is authored as ["high", "max"], but providers/deepseek/models/deepseek-v4-flash.toml exposes ["low", "high", "max"] (Flash keeps low; Pro maps low→high). The Flash/Pro effort lists look swapped, so callers get the wrong control set. Action: Set Flash effort to ["low", "high", "max"] (or another host-proven set that still reflects Flash’s native low support).
  • [high] [violation] providers/coderplan/models/deepseek/deepseek-v4-pro.toml:9 - Check: DeepSeek V4 Pro effort must match first-party lab baseline. Why: Pro is authored as ["low", "high", "max"], but providers/deepseek/models/deepseek-v4-pro.toml and AGENTS baseline use ["high", "max"] only. Action: Set Pro effort to ["high", "max"] unless CoderPlan docs/tests show a real extra low level on this host.
  • [high] [violation] providers/coderplan/models/deepseek/deepseek-v4-flash.toml:4 - Check: Every toggle needs a leading top-of-file wire-path comment. Why: Both DeepSeek files set type = "toggle" with no header documenting the request field (e.g. thinking.type = enabled|disabled). Sync-safe headers are required so clients know the actual control. Action: Add a leading comment on each toggle file with the exact CoderPlan/OpenAI-compatible wire path used to enable/disable thinking.
  • [medium] [violation] providers/coderplan/models/anthropic/claude-haiku-4-5.toml:1 - Check: Non-USD costs must record conversion rate/date in a top-of-file comment. Why: The PR body says CNY catalog prices were converted at 1 USD = 7.15 CNY (2026-08-18), but none of the seven model TOMLs include that leading note; AGENTS requires it on the files themselves. Action: Add a leading header on each priced model file (or equivalent shared note per file) with CNY source, rate, and date used for the USD/MTok values.

…ricing headers

- deepseek-v4-flash: effort [low, high, max] (matches upstream baseline)
- deepseek-v4-pro: effort [high, max] (matches upstream baseline)
- Add wire-path comment on DeepSeek toggle files (thinking.type passthrough)
- Add CNY conversion header (1 USD = 7.15 CNY, 2026-08-18) on all priced files
@novaforge61

Copy link
Copy Markdown
Author

All four action items addressed in 7f057e9:

  1. deepseek-v4-flasheffort = ["low", "high", "max"] (matches upstream baseline; Flash keeps low)
  2. deepseek-v4-proeffort = ["high", "max"] (matches upstream baseline)
  3. Wire-path headers added on both DeepSeek toggle files: OpenAI-compatible chat.completionsthinking.type = enabled|disabled
  4. CNY conversion headers added on all 7 priced model files: 1 USD = 7.15 CNY (2026-08-18), source catalog URL included

bun run validate passes locally. Thanks for the precise catches — especially the Flash/Pro swap.

@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Aug 19, 2026
@rekram1-node

Copy link
Copy Markdown
Collaborator

I dont see cache pricing listed here?

@novaforge61

Copy link
Copy Markdown
Author

CoderPlan doesn't currently publish separate cache pricing — the catalog prices already reflect cache-hit savings ("重复上下文按缓存读取价重算"), billed at a flat rate per model (GPT ~0.35×, Claude ~0.5×, DeepSeek ~0.8× official). The dashboard itemizes cache hits per call, but there's no public per-model cache_input/cache_output rate table yet.

Also noting the upstream base entries (e.g. anthropic/claude-opus-4-7) here don't list cache costs either — I matched that shape. Happy to add cache fields if/when CoderPlan publishes explicit cache rates; can also compute effective cache rates from the multiplier if maintainers prefer that (would be derived, not catalog-sourced — flagging transparently).

@rekram1-node

Copy link
Copy Markdown
Collaborator
Screenshot 2026-08-19 at 3 27 52 PM

Doesnt this say cache pricing right here???

- claude-sonnet-4-6: cache ¥0.10/1M -> 0.014
- claude-haiku-4-5: ¥0.05 -> 0.007
- gpt-5.5: ¥0.18 -> 0.025
- gpt-5.4: ¥0.09 (standard tier) -> 0.0126
- deepseek-v4-pro: ¥0.24 -> 0.0336
- deepseek-v4-flash: ¥0.08 -> 0.0112
- claude-opus-4-7: left blank pending clean tier confirmation (catalog page groups are ambiguous for this one)
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Aug 20, 2026
@novaforge61

Copy link
Copy Markdown
Author

You're absolutely right — my mistake. The catalog page does list cache pricing (缓存读取 column); I checked an incomplete render earlier and missed it. Thanks for catching it.

Added cache_input in cf40ead, converted from the CNY catalog at the same 1 USD = 7.15 CNY rate already documented in the file headers:

model catalog 缓存读取 cache_input (USD)
claude-sonnet-4-6 ¥0.10/1M 0.014
claude-haiku-4-5 ¥0.05/1M 0.007
gpt-5.5 ¥0.18/1M 0.025
gpt-5.4 ¥0.09/1M (standard tier) 0.0126
deepseek-v4-pro ¥0.24/1M 0.0336
deepseek-v4-flash ¥0.08/1M 0.0112

One honest gap: claude-opus-4-7 left without cache_input — the catalog page shows multiple price groupings for it and I couldn't cleanly confirm which tier pairs with the input price used here, so I'd rather leave it blank than guess. Happy to fill it if maintainers prefer a specific tier (or I can confirm with the CoderPlan team).

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/coderplan/models/anthropic/claude-haiku-4-5.toml:11 - Check: Cost keys must match the strict schema (cache_read, not aliases). Why: Six models author cache_input, which is not a valid cost field (packages/core/src/schema.ts Cost is .strict() and only allows cache_read / cache_write). Validation should reject these files, and cache pricing will not publish correctly. Action: Rename cache_inputcache_read in claude-haiku-4-5.toml, claude-sonnet-4-6.toml, deepseek-v4-flash.toml, deepseek-v4-pro.toml, gpt-5.4.toml, and gpt-5.5.toml.

@novaforge61

Copy link
Copy Markdown
Author

Renamed to cache_read in 9ba0b966 — schema was the source of truth, my mistake on the field name. All six files updated.

@novaforge61

Copy link
Copy Markdown
Author

Correction to my previous comment: the rename commit is 643ed87a39a8 (all six files, cache_input → cache_read).

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.

2 participants