Skip to content

feat(amd-tokenlab): add AMD Token Lab provider - #14856

Draft
matrived wants to merge 5 commits into
anomalyco:devfrom
matrived:add-amd-tokenlab
Draft

matrived wants to merge 5 commits into
anomalyco:devfrom
matrived:add-amd-tokenlab

Conversation

@matrived

@matrived matrived commented Nov 27, 2026 •

Copy link
Copy Markdown

Adds AMD Token Lab, an OpenAI-compatible inference API running on AMD Instinct GPUs. It's available to AMD AI Developer Program members: sign in at https://notebooks.amd.com/tokenlab to get a key.

  • providers/amd-tokenlab/provider.toml: OpenAI-compatible endpoint https://api.tokenlab.amd.com/v1, AMD_TOKENLAB_API_KEY
  • providers/amd-tokenlab/logo.svg: the official AMD Token Lab lockup, embedded as a mask over currentColor so it follows light and dark themes
  • providers/amd-tokenlab/models/*.toml: 7 chat models, all override-only on existing lab files:
    DeepSeek-V4.1-Flash, DeepSeek-V4-Flash, Gemma-4-31B-IT, MiniCPM5-2B, MiniCPM-V-4.7-1B, MiniCPM-V-4.7-35B-A3B, Qwen3.8-27B

This is a separate host from providers/amd (AMD Token Factory, China endpoint developer.amd.com.cn): different base URL, keys and limits, so it gets its own provider ID.

Data sources (live-tested with a Token Lab key)

  • Models, context and modalities: GET /v1/models returns context_length, input_modalities and supported_parameters per model. Overrides only where Token Lab differs from the lab file:
    • DeepSeek V4/V4.1 Flash: 1,048,576 context
    • MiniCPM-V 4.7 1B: 200,000 context, so output is capped at the context
    • MiniCPM-V and Qwen3.8: text and image input only (no video)
  • Reasoning: /v1/chat/completions validates reasoning_effort as none|minimal|low|medium|high|xhigh|max (anything else returns 400). Controls follow the same models in providers/amd.
  • Structured output: a strict json_schema response_format returned schema-valid JSON on all 7 models.
  • Tools: tools/tool_choice produced finish_reason: "tool_calls" on 6 models. MiniCPM-V 4.7 1B accepted tools but didn't call one in a single test (noted in its file).
  • Images: a PNG image_url was described correctly by DeepSeek V4.1 Flash, Gemma 4, both MiniCPM-V models and Qwen3.8.
  • Pricing: there's no per-token charge. Each AMD AI Developer Program key comes with 10 usage points, and requests deduct points based on the model and how much it is used (details at https://notebooks.amd.com/tokenlab). So every price is 0, the same convention as providers/amd.

Not included: the decision models listed by the host (Clef, d3, d3-flash). Token Lab's systemone endpoint wasn't verified.

Checks

  • bun validate passes.
  • bun run v1:check: the only v1 changes are the added amd-tokenlab provider fields. It also flags generic image modalities on the two MiniCPM-V files; the host doesn't document exact MIME types, and providers/amd uses the same generic value for these models.
  • Used end to end in OpenCode with the same settings (@ai-sdk/openai-compatible, this base URL): multi-step coding tasks with tool calls, file edits and test runs completed on DeepSeek V4.1 Flash, DeepSeek V4 Flash, Gemma 4 31B and Qwen3.8 27B.

Adds AMD Token Lab, an OpenAI-compatible inference API on AMD Instinct
GPUs for AMD AI Developer Program members (https://api.tokenlab.amd.com/v1),
with seven chat models: DeepSeek V4.1 Flash, DeepSeek V4 Flash,
Gemma 4 31B IT, MiniCPM5 2B, MiniCPM-V 4.7 1B, MiniCPM-V 4.7 35B-A3B
and Qwen3.8 27B.

This branch has not been deployed

No deployments
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