Skip to content

Add SahabatMobile provider - #13727

Open
sahabatmobile wants to merge 7 commits into
anomalyco:devfrom
sahabatmobile:sahabatmobile-provider
Open

sahabatmobile wants to merge 7 commits into
anomalyco:devfrom
sahabatmobile:sahabatmobile-provider

Conversation

@sahabatmobile

@sahabatmobile sahabatmobile commented Nov 15, 2026 •

Copy link
Copy Markdown

Re-open of #7204 as a fresh branch, per review feedback from @rekram1-node (the previous branch was considered diverged from dev). Base content passed review in #7204, plus a model-catalog expansion and review fixes.

What this adds

New provider SahabatMobile (providers/sahabatmobile/, 13 files):

  • provider.toml — OpenAI-compatible API (https://www.sahabatmobile.com/api/v1), npm = "@ai-sdk/openai-compatible", opencodeai = "@opencode/ai/providers/openai-compatible", env SAHABAT_API_KEY, docs link
  • logo.svg
  • Models (11):
    • MiniMax-M3 — reasoning toggle (adaptive/disabled), official $0.30/$1.20, tier >512k tokens $0.60/$2.40
    • mimo-v2.5 — reasoning toggle (default on), official $0.14/$0.28; Xiaomi retired this upstream ID (2026-10-21), the SahabatMobile gateway aliases the slug to mimo-v2.6-flash, so it stays callable (base_model points at the serving model, name keeps the display)
    • mimo-v2.6-flash / mimo-v2.6-pro — reasoning toggle (default on), official $0.14/$0.28 and $0.435/$0.87
    • qwen3.8-max — reasoning effort (low/medium/xhigh) + budget, official $2.00/$6.00
    • claude-haiku-5-5 — official Anthropic price, tiered: $0.1/$0.5; prompts >100k tokens $0.5/$2.5 (cost overrides)
    • claude-sonnet-5-5 — official $2/$10
    • claude-opus-4-6 / claude-opus-4-8 — official $5/$25
    • LongCat-2.0 / LongCat-2.5-Preview — official limited-time rate $0.30/$1.20

Pricing notes

  • Every cost is the official vendor price, cited to the vendor's own pricing page in each file header (Anthropic, Xiaomi MiMo, MiniMax, LongCat; qwen3.8-max $2/$6 verified on Alibaba Model Studio's international table).
  • What SahabatMobile itself bills customers (official cost + margin, in IDR/credits) is configured in our pricing console and shown to customers at https://www.sahabatmobile.com/dashboard/packages — the toml cost fields intentionally publish the upstream rate, not the marked-up retail.

Validation

  • bun run validate — exit 0 (run against current dev + these files).
  • bun run v1:check — additive only: new provider + 11 models; no existing v1 fields changed, no generic-modality warnings.
  • The 20 failing bun test cases are pre-existing on dev (build-snapshot / network-dependent sync tests), unrelated to this change.

Branch note

This branch is based on the fork's dev snapshot of the same reviewed content — a pure rebase onto the latest upstream tip was blocked by token workflow-scope restrictions (ci-fixer.yml changed upstream), so the diff is strictly the provider files; merging results in dev + these files, no workflow files touched.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] providers/sahabatmobile/models/mimo-v2.5.toml:2 - Check: Model availability and serving arrangement for mimo-v2.5 against the upstream retirement documented in this repository. Why: The file states requests are "proxied to upstream Xiaomi API" and lists the model with no status, but the base revision records that Xiaomi retired mimo-v2.5 on 2026-10-21: providers/xiaomi/models/mimo-v2.5.toml is status = "deprecated" with a live 400 "Unsupported model mimo-v2.5" from api.xiaomimimo.com (2026-10-21, requests rerouted to mimo-v2.6-flash from 2026-10-14), and OpenRouter's entry carries the same expiration date. This PR is dated 2026-11-05, so a true upstream proxy would either fail for every caller or silently serve a different model — the exact outcome the restricted-models rule exists to prevent. The line-4 "Served by SahabatMobile ... (MiMo Direct)" comment also contradicts the line-2 proxy claim. Action: Live-verify mimo-v2.5 on https://www.sahabatmobile.com/api/v1 today. If it works, the host is not proxying Xiaomi's API — correct the line-2 comment to the actual serving arrangement (e.g. own weights deployment) and cite that evidence; if it does not work, remove the entry (or set status = "deprecated").

Adds 8 models served directly by the SahabatMobile API (OpenAI-compatible):
- Claude Sonnet 5.5, Opus 4.6, Opus 4.8, Haiku 5.5 (Anthropic direct)
- LongCat 2.5 Preview, LongCat 2.0 (LongCat direct provider)
- MiMo v2.6 Pro and Flash (Xiaomi MiMo Direct)

Retail pricing = official upstream price per model, sourced from
SahabatMobile dashboard/packages (accessed 2026-11-15) with upstream
docs citations in each file. Revalidated with bun run validate (exit 0).
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] providers/sahabatmobile/models/mimo-v2.5.toml:2 - Check: Every added provider model must actually be callable on the host. Why: The header says mimo-v2.5 is "proxied to upstream Xiaomi API", but providers/xiaomi/models/mimo-v2.5.toml documents that Xiaomi retired mimo-v2.5 on 2026-10-21 (requests routed to mimo-v2.6-flash; a live probe on 2026-10-21 returned 400 "Unsupported model") and carries status = "deprecated" — all predating this PR. Either the proxy claim is false or every call to this entry errors, which is the "listed but uncallable" case the restricted-models rule exists to block. Action: Verify mimo-v2.5 is served by SahabatMobile today; if it proxies MiMo Direct, remove the entry (or set status = "deprecated"); if SahabatMobile self-hosts the open weights, correct the "proxied to upstream Xiaomi API" comment and source the serving arrangement.

  • [medium] [violation] providers/sahabatmobile/models/LongCat-2.0.toml:8 - Check: AGENTS.md requires every toggle = true to carry a leading top-of-file comment with the exact wire path (sync strips comments elsewhere). Why: Five files set toggle = true with no toggle wire comment — LongCat-2.0.toml:8, LongCat-2.5-Preview.toml:8, claude-haiku-5-5.toml:9, mimo-v2.6-flash.toml:10, mimo-v2.6-pro.toml:10 — while the MiniMax-M3, mimo-v2.5 and qwen3.8-max files in this same PR do have them. The header is the only durable record of how thinking is toggled on this host. Action: Add the header wire comment to each (e.g. # Toggle: thinking.type = enabled|disabled for the LongCat and MiMo files, matching the first-party entries; for claude-haiku-5-5, the exact field SahabatMobile's chat-completions surface accepts, e.g. thinking.type = adaptive|disabled).

  • [medium] [violation] providers/sahabatmobile/models/claude-sonnet-5-5.toml:8 - Check: Provider files using base_model must be override-only; identical inherited values must not be restated. Why: tools = { supported = true, choice = ["auto", "none"] } is identical to [capabilities] tools in models/anthropic/claude-sonnet-5-5.toml, so this line restates inherited data (the haiku and opus files add choice as a real delta over their lab files; this one resolves to the same value either way). Action: Delete the tools line from this file and let it inherit.

  • [low] [possible mistake] providers/sahabatmobile/models/claude-haiku-5-5.toml:16 - Check: Published cost data must match the source the file cites. Why: The header claims "Retail = official Anthropic price", but official haiku-5.5 pricing is tiered by prompt length: over 100,000 tokens it bills $0.5 input / $2.5 output (see the overrides in providers/anthropic/models/claude-haiku-5-5.toml, mirrored by peers such as neon). The flat $0.1/$0.5 understates the price for long prompts. Action: Either add [[cost.text.input.overrides]] / [[cost.text.output.overrides]] for context = { gt = 100_000 }, or correct the header to state that SahabatMobile charges a flat rate regardless of prompt length, sourced to the dashboard page.

  • [low] [possible mistake] providers/sahabatmobile/models/LongCat-2.0.toml:2 - Check: Inherited capability/limit values must match the API surface the file claims to serve. Why: These files assert passthrough of specific upstreams but inherit lab defaults that the repo's first-party entries for those same APIs contradict: LongCat's API fixes temperature and documents max_tokens (first-party LongCat sets temperature = false and compatibility.max_tokens_field = "max_tokens"; this file inherits temperature = true and omits the field), MiMo's chat API has no top_k parameter (first-party Xiaomi sets top_k = false; the mimo-v2.6 files inherit true), and MiniMax's platform documents 1,000,000 context / 524,288 max output while MiniMax-M3.toml:2 claims upstream proxy and inherits 1,048,576 / 512,000. Action: Verify what SahabatMobile's gateway actually accepts for each and set the host deltas, or note in the headers that the gateway normalizes these fields.

  • [low] [violation] providers/sahabatmobile/provider.toml:1 - Check: AGENTS.md requires running both bun validate and bun run v1:check after every catalog change. Why: The PR body reports only bun run validate; these 11 models will newly appear in the published v1 API, and v1:check is the documented step that confirms nothing else in v1 changed. Action: Run bun run v1:check against the merge-base and confirm the only changes are the expected additive ones (new provider plus 11 models; all modalities here map to existing v1 values).

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/sahabatmobile/models/mimo-v2.5.toml:8 - Check: base_model must identify the lab model that actually serves requests on this host. Why: The file's own header (lines 2–4) states Xiaomi retired the mimo-v2.5 upstream ID on 2026-10-21 and that SahabatMobile's gateway aliases mimo-v2.5 → mimo-v2.6-flash, so every request is served by v2.6-flash. The repo corroborates this: providers/xiaomi/models/mimo-v2.5.toml is status = "deprecated" ("Unsupported model" upstream). Pointing base_model at xiaomi/mimo-v2.5 publishes v2.5's identity facts (knowledge 2024-12, release date 2026-04-22, v2.5 description/benchmarks, and canonical_model_id xiaomi/mimo-v2.5 in api.json/catalog.json) for responses actually generated by a different model. Action: Verify which model the gateway returns for the mimo-v2.5 slug, then repoint base_model to xiaomi/mimo-v2.6-flash (keeping the alias documentation, plus a name override if the slug needs a distinct display name) — or drop the entry if the slug is legacy-only.
  • [low] [possible mistake] providers/sahabatmobile/models/mimo-v2.5.toml:17 - Check: PR-body pricing claims must match the final file contents and cite what SahabatMobile itself bills. Why: The PR body lists mimo-v2.5 at "$0.15/$0.45 per MTok" and says all pricing is "sourced from our public dashboard/packages page", but the final file prices it at 0.14/0.28 (changed in a later commit) and the headers now cite only official vendor pricing pages, which support the upstream rate but not SahabatMobile's retail rate. A maintainer approving the data change would be approving numbers the PR description misstates. Action: Update the PR body to the final prices, and keep at least one citation to SahabatMobile's own pricing page (e.g. the previously cited dashboard/admin pricing URL) so the host's billed rates — not just the upstream vendors' — are evidenced.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [low] [possible mistake] providers/sahabatmobile/models/mimo-v2.5.toml:11 - Check: Override-only provider files must carry this host's real capability deltas for the API they actually serve. Why: The file's own header documents that mimo-v2.5 is redirected to and served by mimo-v2.6-flash over the same MiMo Direct chat-completions API, yet unlike its sibling mimo-v2.6-flash.toml (and mimo-v2.6-pro.toml) added in this same PR, it omits tools = { supported = true, strict = true, choice = ["auto"] } and structured_output = true. The identical serving API therefore resolves to different published capabilities across two entries in one provider (e.g. tool_choice restrictions that MiMo documents — only auto, others dropped — are unspecified on this slug). Action: Copy the same host deltas from mimo-v2.6-flash.toml, or verify and document in the header why this slug behaves differently on the gateway.

  • [low] [possible mistake] PR description - Check: The PR body must accurately describe and cite the changes being merged. Why: The body still describes the original 5-file change set ("the diff here is strictly the 5 provider files", mimo-v2.5 at $0.15/$0.45, "content is unchanged from feat: add SahabatMobile provider #7204, which passed review"), but the final diff adds 13 files / 11 models, corrects mimo-v2.5 pricing to $0.14/$0.28, and sources prices from official vendor pages (per the file headers) rather than the dashboard page the body cites. The description contradicts the final state of the data changes maintainers are asked to approve. Action: Update the PR body to list the full 11-model change set, the final prices, and the per-file vendor citations now in the headers.

@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 Nov 16, 2026

This branch was previously deployed

1 inactive deployment
release — 48ded5b9 Deployed Nov 16, 2026 by sahabatmobile via review #19246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant