AI/ML API provider with ten measured routes - #1
Open
Lookoff-AIMLAPI wants to merge 4 commits into
Open
Lookoff-AIMLAPI wants to merge 4 commits into
Lookoff-AIMLAPI wants to merge 4 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
aimlapi/gpt-6-sol,aimlapi/gpt-6-lunaaimlapi/claude-opus-5.5,aimlapi/claude-sonnet-5aimlapi/gemini-3.8-flashaimlapi/deepseek-v4.1-flashaimlapi/glm-5.2aimlapi/kimi-k3aimlapi/grok-4.7aimlapi/qwen3.7-maxThe sweep used a 16k output ceiling on purpose: at 256 tokens
qwen3.7-max"rejected" low and medium, and the real message wasmax_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, sinceAIMLAPI_API_BASE_URLcan move our provider off the gateway and any other provider's override can move it on. Exact hostname match, soapi.aimlapi.com.example.netnever 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 abalancemetric 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-lunaandaimlapi-claude-sonnet-5to 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_IDships 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-modelshandling for catalog-only providers (N/A — this one ships preselected models). The tray icon and its source record are included.