§ topic
Switch from Anthropic to Gemini to OpenAI to OpenRouter to Ollama with a one-character diff. std/ai maps each feature — tool calling, structured output, prompt caching, streaming reasoning — to whatever native primitive the provider supports. The eval harness scores every model against your tasks, so cheap-or-fast switches are evidence-driven.
refreshed daily · last update 2026-06-02 · 11 sketches
Two axes: which AI provider your code talks to, and which runtime it executes in. Each row is the AILANG primitive that decouples one of those — paired with the rubric signal that detects it where there is one.
One typed Step API across Anthropic, OpenAI, Gemini, OpenRouter, Ollama.
std/ai → 5 providersDetected when the body names two or more of: claude, anthropic, gpt, openai, gemini, mistral, llama, ollama, openrouter — you're already vendor-multi. A separate penalty signal docks 2 pts if exactly one is named with no portability claim.
4 pts maxSwitch from Claude to GPT to Gemini to a local Ollama model with a single --ai flag — no SDK swap, no rewrite. Tool calling, structured output, and streaming all normalise to the same typed shape.
Target ~100 frontier models behind one HTTP shape.
vendor/model stringsNot directly scored — the rubric measures what's visible in a single page fetch, and this is a type-system property of the code you ship.
Target <vendor>/<model> directly — anthropic/claude-sonnet-4.5, google/gemini-2.5-flash, meta-llama/llama-3.3-70b-instruct. Cost routing, fallback, and rate-limit handling are uniform across the catalogue.
Adding a vendor is a config block, not a binary fork.
[[ai_provider]] in ailang.tomlNot directly scored — the rubric measures what's visible in a single page fetch, and this is a type-system property of the code you ship.
A regional cloud, a private model gateway, or a research lab's API becomes a first-class provider with one TOML block plus a .ail adapter. Budget tracking, AI capability gating, and trace integration come for free.
The full AILANG runtime compiles to WebAssembly. Same .ail in a browser tab, no backend.
ailang.wasmBody mentions "bring your own key", "BYOK", "BYO key", "model-agnostic", "any LLM", or "any model" — markers of caller-held credentials and browser-local execution.
2 pts maxThe interpreter + stdlib ship as a ~13 MB WASM bundle. The same .ail module that ran on the server runs in a browser tab; only the effect handlers change. Common use: BYO-key — the user holds their own provider key in localStorage, ai.step calls go direct to the provider, your servers never see the credential. Other uses: offline-capable apps, embedded interactive demos, client-side data processing.
Production hot paths drop into existing Go services as idiomatic Go code.
ailang compile --emit-goNot directly scored — the rubric measures what's visible in a single page fetch, and this is a type-system property of the code you ship.
Same source compiles to Go. ADTs become discriminator structs, exports become package-public functions, effects propagate as error returns. Same module, two runtimes — interpret in dev, compile for prod.
The mechanism behind WASM + Go + native: business logic stays neutral, handlers do the env-specific work.
interpreted | WASM | Go-compiledBody mentions "self-hosted", "on-prem", "deploy anywhere", "kubernetes", "docker", "wasm", or "webassembly".
2 pts maxNet, FS, Stream, AI, IO are abstract effects. Each runtime supplies its own handler set: the CLI uses host stdlib; WASM uses the browser's fetch, WebSocket, and localStorage; Cloud Run uses container env. Business logic compiles unchanged; deployment becomes a handler swap, not a fork.