Sulat.com / Writing on AITuesday, November 24, 2026
Agent Engineering/24 November 2026

How to auto-add OpenCode’s free models to Amp with models.dev

Amp's curated OpenCode Go list can miss free models. Use models.dev, explicit mappings and a saved prompt to add, probe, update and prune them automatically.

Translucent model cards with green price tags move from a catalogue into a dark terminal-style model picker.

At a glance

  • A dedicated OpenCode Go connection can expose free models that Amp’s curated provider list does not include.
  • A saved prompt can use models.dev metadata to add models, update limits and prune retired entries.
  • Small live probes verify availability and routing without sending context-window-sized requests.

Amp’s built-in OpenCode Go provider offers a curated model list, but that list does not necessarily contain every free model in the live catalogue. A separate OpenCode Go connection with explicit model mappings can fill the gap. Add models.dev metadata and an Amp automation, and that connection can add new free models, update their limits and prune retired ones.

In Sulat’s test on 24 November 2026, models.dev listed four active, free, tool-calling Go chat models: HungerG, Hy4 flash, Beam and Iceman Contributor. With the custom connection disabled, none of those four model IDs appeared in Amp’s model options. With it enabled, all four appeared and passed small live inference probes.

Before starting

The setup needs an OpenCode Go subscription and API key. This is not a workaround for OpenCode’s client or subscription rules. “Free” describes the included model inference; the Go subscription, the Amp agent performing the synchronization and any orb time are separate.

Model routing belongs to the Amp account, not to a repository. The models work from orbs, runners and local Amp sessions. A small scheduled orb is a convenient automation host because Amp can resume it for each run, but it is optional. Keep the API key in Amp’s provider credential dialog: never paste it into an article, repository, prompt or shell command.

The one-prompt setup

Paste this into an Amp thread. It creates a dedicated provider, verifies each model with a real request, saves a reusable sync prompt and schedules it. Amp should ask for the Go key through its secret dialog when needed.

Code
Create and maintain a personal Amp model provider called “OpenCode - FREE” using OpenCode Go. Create it if it is missing and preserve its credential if it already exists. Ask me to enter the API key through Amp's secret dialog when necessary. Never print or store the key in the thread. Do not change any other provider's mappings, credentials, activation or priority.

Use this procedure for the initial sync and every later sync:

1. Fetch https://models.dev/api.json with User-Agent amp-free-model-sync/0.1 and read providers["opencode-go"].models. If the fetch or JSON validation fails, leave the provider unchanged and report the error. Never prune from incomplete data.

2. Include only models where models.dev says: status is not deprecated; every present cost among input, output, cache_read and cache_write is zero; tool_call is true; output includes text; provider.api is https://opencode.ai/inference/go/openai/v1; and limit.context and limit.output are positive. Do not match names, so new free and stealth models are caught automatically. Exclude paid, deprecated, decision, embedding, image-generation and non-tool-calling entries.

3. For each eligible raw model ID, map opencode-go/<id> -> <id>. Sort the mappings by canonical ID and include this comment: # Managed by sync-opencode-free: active free chat models from models.dev/opencode-go.

4. Add a complete modelMetadataOverlays entry for each model. For its displayName, remove one trailing case-insensitive “ Free” from the catalogue name, then append “ - FREE”. Set maxOutputTokens to limit.output. Set maxInputTokens to limit.input when present and positive, otherwise limit.context minus limit.output; Amp adds the output allowance to the input allowance when displaying total context. Exclude and report malformed entries with a non-positive derived input limit. Set supportsImageInput when the input modalities contain image, reasoning from the metadata and toolCall true.

5. Update only this provider's modelMapping and modelMetadataOverlays, preserving its other config and headers. Send the complete generated overlay object because updates replace all overlays. Add new models, update changed metadata and prune entries no longer eligible. Keep the provider active and at priority 0 so a catch-all router cannot intercept these custom IDs. Leave my original OpenCode Go provider and every other provider alone.

6. Probe every resulting model sequentially with amp config model-providers check-access --provider-model <canonical-id> --thread <this-thread-ID>. Use the real current Amp thread ID. Success requires ok=true, this provider as the serving connection and the expected raw providerModelID. Use small inference requests, not prompts sized to fill the context window; models.dev supplies the advertised limits.

7. A failed probe, transient error or rate limit does not authorize pruning or deactivation. Keep any model that remains eligible and report the failure and actual routed connection.

8. Report added, updated, removed and unchanged models, probe pass/fail counts, and each model's context and output limits.

Save steps 1–8 as my personal prompt named “sync-opencode-free”. Make that prompt find this dedicated provider by its exact name and stop safely if it is missing or duplicated. Then schedule this thread to retrieve and run sync-opencode-free every day at 9:00 AM. If this thread already has a schedule, ask before replacing it.

The new models appear under Other Models. In Settings → Model Selector, use Add Model to pin useful ones to Top Models. The list holds eight.

How the pieces fit together

A mapping gives Amp a stable model ID and tells OpenCode which raw model to run:

Code
opencode-go/hungerg-free -> hungerg-free

A metadata overlay makes an unknown model usable in the selector. It supplies the display name, token limits, vision support, reasoning support and tool-call capability. For HungerG, the tested overlay was:

Code
{
  "opencode-go/hungerg-free": {
    "displayName": "HungerG - FREE",
    "maxInputTokens": 1000000,
    "maxOutputTokens": 65536,
    "supportsImageInput": true,
    "reasoning": true,
    "toolCall": true
  }
}

The subtraction in the prompt matters. When models.dev gives an explicit input limit, use it. When it gives only a total context window, subtract the output allowance rather than adding it twice. Hy4 flash illustrates the explicit case: 983,040 input tokens plus 65,536 output tokens equals its 1,048,576-token context.

Modelmodels.dev contextOutputImage input
HungerG – FREE1,000,000 input65,536Yes
Hy4 flash – FREE1,048,576 total65,536Yes
Beam – FREE1,048,576 total131,072No
Iceman Contributor – FREE262,144 total131,072No
The four free Go chat models observed on 24 November 2026. The catalogue and metadata can change at any time.

Run it on demand or inspect one model

Once the personal prompt exists, start a full catalogue sync from any Amp thread with:

Code
run sync-opencode-free

To check only HungerG, run this in the thread’s execution environment. Amp associates the check with the current thread unless --thread says otherwise:

Code
amp config model-providers check-access --provider-model opencode-go/hungerg-free

The command performs a real, small inference and reports which connection served it. A successful result should name OpenCode – FREE and show providerModelID as hungerg-free. If a catch-all connection intercepts the request, move the dedicated free provider above it in Model Routing.

Use a separate scheduling prompt instead

If the provider and saved prompt already exist, this is enough to automate them:

Code
Every day at 9:00 AM, retrieve and follow my personal saved prompt named sync-opencode-free. Report catalogue changes and probe failures. If the prompt is missing, make no provider changes and tell me. Do not create another schedule.

Each Amp thread has at most one schedule. Use a dedicated thread, such as a small scheduled orb, if the current thread already owns another automation.

Guardrails that matter

  • Do not probe context limits by flooding models. Metadata supplies the advertised limits; small inference requests check availability and routing without wasting free quotas.
  • Do not prune after an incomplete fetch or a failed inference. Removal follows models.dev eligibility: an entry disappears, becomes deprecated, gains a price or stops supporting text tool calls.
  • Do not assume OpenCode’s public free tier works in Amp. This recipe follows the opencode-go catalogue. OpenCode says its other free-tier chat models require the OpenCode client.
  • Expect churn. Free and stealth models are limited-time offers, and some have daily request limits or regional restrictions.
  • Check privacy before sending code. The live Go metadata marked Iceman Contributor as training on requests during Sulat’s test. OpenCode says Beam retains prompts for 30 days but does not train on them. HungerG and Hy4 flash were marked zero data retention and no training in the same metadata.

The useful separation is deliberate: models.dev decides which entries belong in the managed catalogue, live probes report whether they work, and transient failures never masquerade as catalogue changes.


Discover more from Sulat AI & Tech News

Subscribe to get the latest posts sent to your email.