Commit Graph

3 Commits

Author SHA1 Message Date
Hongming Wang
def15d3738 fix: document Token Plan URL support and multi-endpoint routing
- README: split Xiaomi MiMo into pay-as-you-go vs Token Plan rows,
  explicitly document ANTHROPIC_BASE_URL as a required secret for
  Token Plan users, and note that operator-set values always win over
  the shell mapping fallback
- entrypoint.sh: add supported Xiaomi MiMo endpoints comment listing
  pay-as-you-go + Token Plan SG/HK URLs for discoverability
2026-04-29 16:56:43 -07:00
Hongming Wang
a21d16d94f feat: add Xiaomi MiMo support via Anthropic-API-compatible routing (testing)
Adds 4 model entries (mimo-v2-flash, mimo-v2-pro, mimo-v2-omni,
mimo-v2.5-pro) selectable from canvas. When MODEL matches mimo-*,
entrypoint.sh exports ANTHROPIC_BASE_URL=https://api.xiaomimimo.com/anthropic
so the claude CLI's native ANTHROPIC_BASE_URL handling routes there.
ANTHROPIC_API_KEY in this case is the Xiaomi key, not Anthropic Console.

Verified live against all 4 model IDs with x-api-key auth — all returned
200 with proper Anthropic-shape Messages responses (id, type=message,
role=assistant, content[].text, usage including cache_read_input_tokens).

Operator-set ANTHROPIC_BASE_URL is never overridden — the case-statement
only fills in the default when unset, so a user-supplied proxy still wins.

Marked as testing because the model→base-URL mapping currently lives in
entrypoint.sh shell. The robust shape is a data-driven `runtime_env`
field in config.yaml read by the platform provisioner; will follow up
with that as a separate cross-repo PR (workspace-server + canvas) so
this template no longer carries provider-specific knowledge in shell.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 03:13:01 -07:00
Hongming Wang
b8859da375 feat: initial template content (extracted from molecule-monorepo) 2026-04-16 03:05:40 -07:00