Skip to content

AI/ML API provider with ten measured routes - #1

Open
Lookoff-AIMLAPI wants to merge 4 commits into
mainfrom
feat/aimlapi-provider
Open

Lookoff-AIMLAPI wants to merge 4 commits into
mainfrom
feat/aimlapi-provider

Conversation

@Lookoff-AIMLAPI

Copy link
Copy Markdown
Member

Adds AI/ML API to the registry as data — config/aimlapi/ ships the provider descriptor and ten model fragments, and the credential, discovery, catalog, tray and installer paths pick it up unchanged.

Every capability claim is measured, not copied. Against the gateway on 2026-09-23:

route reasoning levels image input
aimlapi/gpt-6-sol, aimlapi/gpt-6-luna low, medium, high yes
aimlapi/claude-opus-5.5, aimlapi/claude-sonnet-5 low → max yes
aimlapi/gemini-3.8-flash low, medium, high, max (rejects xhigh) yes
aimlapi/deepseek-v4.1-flash low, medium, high yes
aimlapi/glm-5.2 minimal → max no
aimlapi/kimi-k3 low, high, max yes
aimlapi/grok-4.7 minimal → max no
aimlapi/qwen3.7-max low, medium, high no

The sweep used a 16k output ceiling on purpose: at 256 tokens qwen3.7-max "rejected" low and medium, and the real message was max_completion_tokens must be greater than thinking_budget. Its medium needs a ceiling above 32k; that is in the model description rather than left for a user to hit. All ten make tool calls.

Attribution (src/aimlapi-attribution.mjs) is gated on the destination host, not the provider id — the only rule that stays true in both directions, since AIMLAPI_API_BASE_URL can move our provider off the gateway and any other provider's override can move it on. Exact hostname match, so api.aimlapi.com.example.net never receives the headers.

Usage reads GET /v1/key (scopes, optional spend limit, month-to-date usage). That is a spend report, not a wallet: a numeric limit becomes a real quota card, and otherwise the money goes in the message rather than into a balance metric claiming to be what is left.

Routes are priority 1–10 so the gateway leads the picker in this fork.

Verification. A real forwarder process routes aimlapi-gpt-6-luna and aimlapi-claude-sonnet-5 to the live gateway and both answer. Full suite (351 files) passes. The new test file proves the seam both ways: flipping the host gate to the loopback the test owns makes the headers arrive at the mock upstream.

Open item. AIMLAPI_PARTNER_ID ships empty — an unknown id is accepted and dropped upstream, so a placeholder would be indistinguishable from a working one.

Not done. The AGENTS.md provider checklist also asks for tray OAuth wiring (N/A — API key only) and bin/curate-models handling for catalog-only providers (N/A — this one ships preselected models). The tray icon and its source record are included.

AI/ML API is an OpenAI-compatible gateway reached with one key, so it joins
the registry as data: config/aimlapi/ ships the provider descriptor and ten
model fragments, and the credential, discovery, catalog, tray and installer
paths pick it up unchanged.

Every capability claim in those fragments is measured against the gateway on
2026-09-23, not copied from a sibling reseller:

- reasoning levels, from a 10x6 sweep with a 16k output ceiling so a model's
  own thinking budget never masqueraded as a rejected effort. gpt-6-sol/luna
  and deepseek-v4.1-flash take low/medium/high; gemini-3.8-flash rejects xhigh
  but accepts max; kimi-k3 takes low/high/max; glm-5.2 and grok-4.7 take the
  full ladder including minimal; qwen3.7-max takes low/medium/high, though its
  medium needs an output ceiling above 32k.
- inputModalities, by sending an image to each: glm-5.2, grok-4.7 and
  qwen3.7-max are text-only on this route and are declared so.
- tool calls, on all ten.

Attribution (src/aimlapi-attribution.mjs) is gated on the destination host
rather than the provider id, which is the only rule that stays true in both
directions: AIMLAPI_API_BASE_URL can move our provider off the gateway, and
any other provider's override can move it on. Exact hostname match, so
api.aimlapi.com.example.net never receives the headers. The partner id is
empty until AI/ML API mints one -- an unknown id is accepted and dropped
upstream, so a placeholder would be indistinguishable from a working one.

provider-usage reads GET /v1/key, which reports the calling key's scopes, an
optional spend limit and month-to-date usage. That is a spend report, not a
wallet, so a numeric limit becomes a real quota card and the money otherwise
goes in the message rather than into a `balance` metric claiming to be what is
left.

Routes are priority 1-10 so the gateway leads the picker in this fork.

Verified live: a real forwarder process routes aimlapi-gpt-6-luna and
aimlapi-claude-sonnet-5 to the gateway and both answer. The full suite (351
files) passes; the new test file also proves the seam, by flipping the host
gate to the loopback the test owns and watching the headers arrive.
Registered as partnerName `codexrouter`. Verified through a real forwarder
process: the outgoing request carries X-AIMLAPI-Partner-ID with this value,
and a live route still answers.
The tray icon commit appended "aimlapi" after "stepfun" in the extension
array, which broke test/provider-branding.test.mjs: it asserts the list ends
with `"stepfun"].contains(assetName`. The array is an unordered set, so the
new entry goes first and the upstream assertion holds unchanged rather than
being edited to accommodate us.

My own regression, and my own filtered test output is why it went unnoticed:
the summary grep also matched every passing "✔ fails ..." line, so the real
counters never reached the terminal.
openai/gpt-6.1-sol (2026-09-29) and anthropic/claude-sonnet-5.5 (2026-09-28)
are both marked hottest on the gateway and both supersede routes already here.
Their predecessors stay listed: all twelve upstream ids are still live, so this
adds rather than replaces, and nobody's pinned route breaks.

Measured 2026-10-01 the same way as the original ten, with a 16k output ceiling
so a thinking budget never reads as a rejected effort:

- gpt-6.1-sol: low, medium, high (same ladder as gpt-6-sol), text and image
- claude-sonnet-5.5: low through max, text and image

Both make tool calls, and both answered 200 through a real forwarder process.

Priorities renumbered 1-12 so the current flagship leads the picker in this
fork; upstream would want these moved into a free range instead.

Full suite: 4610 tests, 0 failing.
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.

1 participant