<command-name>/model</command-name> <command-message>model</command-message>…
- User
/model model
- User
i want you to setup free models for keating. get free model setup with openrouter so people can just get started using it. https://openrouter.ai/collections/free-models pick laguna m.1 from poolside.
- Assistant· <synthetic>
API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context
- User
/model model
- User
.
Assistant· claude-sonnet-4-6
Let me explore the keating project structure to understand how models are currently configured.
Assistant· claude-sonnet-4-6
Now let me look at how providers are wired up in the Pi module.
Assistant· claude-sonnet-4-6
Now let me look at the setup flow to understand how new providers are added:
Assistant· claude-sonnet-4-6
Let me check if the pi agent supports OpenRouter and look at any docs:
Assistant· claude-sonnet-4-6
Let me check the pi agent docs for OpenRouter model format:
Assistant· claude-sonnet-4-6
Let me check how pi handles the openrouter provider natively:
Assistant· claude-sonnet-4-6
Now I have the full picture. Pi natively supports
openrouteras a provider viaOPENROUTER_API_KEY. I need to wire it into keating's three places: config defaults, runtime auth detection, and the setup wizard.Assistant· claude-sonnet-4-6
Now add OpenRouter to the runtime auth detection:
Assistant· claude-sonnet-4-6
Now add OpenRouter to the fallback candidates in
selectAuthenticatedProvider:Assistant· claude-sonnet-4-6
Also update the error message when no provider is found:
Assistant· claude-sonnet-4-6
Now add OpenRouter to the setup wizard:
Assistant· claude-sonnet-4-6
Now let's verify the build still passes:
Assistant· claude-sonnet-4-6
Clean. Here's a summary of the changes:
3 files changed:
-
src/core/config.ts— addedopenrouter: "poolside/laguna-m.1:free"toFALLBACK_PI_MODELS -
src/runtime/pi.ts— added OpenRouter to three places:PROVIDER_ENV_KEYS: readsOPENROUTER_API_KEYPROVIDER_SETUP_HINTS: tells users to get a free key at openrouter.ai- fallback candidate list in
selectAuthenticatedProvider(after anthropic) - error message when no provider found now mentions
OPENROUTER_API_KEY
-
src/cli/setup.ts— added OpenRouter as the first option inkeating setup:- Provider list: "OpenRouter (free) — Free models, no credit card required" as the top choice
- Models: "Poolside Laguna M.1 (free)" as the only preset for openrouter
Users can now:
export OPENROUTER_API_KEY=your_key+keating setup→ pick OpenRouter → Laguna M.1 free- Or just set the env var and keating will auto-fall back to openrouter if google/openai/anthropic aren't configured
-
- User
add the other models for open router, also i want you to add using free open router models in the getting an api key section in the website.
Assistant· claude-sonnet-4-6
Let me look at the website and check what free models OpenRouter has available in parallel.
Assistant· claude-sonnet-4-6
Now let me look at the website's API key and provider-related components:
Assistant· claude-sonnet-4-6
Now let me find the tutorial page:
Assistant· claude-sonnet-4-6
Now I have everything. Let me make all three changes in parallel:
Assistant· claude-sonnet-4-6
Now add the OpenRouter section to the Tutorial page — inserting it before the Google section as the featured "free" option:
Assistant· claude-sonnet-4-6
Also add OpenRouter to the
providerLabelfunction in the API key prompt dialog so it shows a nice name:Assistant· claude-sonnet-4-6
Now verify the build:
Assistant· claude-sonnet-4-6
Clean. Here's what changed across 5 files:
CLI (
src/cli/setup.ts)- OpenRouter now shows 8 model choices: Laguna M.1 (recommended), Laguna XS.2, GPT-OSS 120B, DeepSeek V4 Flash, Gemma 4 31B, Nemotron 120B, Kimi K2.6, and Custom
Website
-
web/src/pages/Tutorial.tsx— New OpenRouter section inserted at the top of the Cloud tab, before Google. It has the "Free" badge, 4-step setup instructions, theOPENROUTER_API_KEYenv var for CLI users, and a list of the 6 featured free models with their IDs, plus a link to the full free models collection. -
web/src/lib/tutorial-links.ts—openrouternow maps to the#openrouter-api-keyanchor, so "Get a key" links from Settings and the API key prompt dialog go to the right section. -
web/src/components/KeatingApiKeyPromptDialog.tsx— The prompt dialog now shows "OpenRouter" instead of the raw provider string when it asks for an OpenRouter key.
- User
for local models can you add zaya 8b from zephra as an option?
Assistant· claude-sonnet-4-6
Let me search for this model to get the exact details before adding it.
- User
[Request interrupted by user for tool use]
- User
zyphra/ZAYA1-8B, use fnox to get the api key https://api.zyphracloud.com is the endpoint
Assistant· claude-sonnet-4-6
Let me check how fnox works in this project before touching anything.
Assistant· claude-sonnet-4-6
Good — ZAYA1-8B isn't on OpenRouter yet, but Zyphra Cloud has its own OpenAI-compatible API. The plan: add the fnox secret, wire the provider into the runtime (writing it to pi's
models.jsoninside.keating/pi-config/), and add it to the setup wizard.Assistant· claude-sonnet-4-6
Now add Zyphra to the config fallback models:
Assistant· claude-sonnet-4-6
Now the big change in
runtime/pi.ts— add the env key, hints, fallback candidate, and themodels.jsonsync that registers Zyphra Cloud as a custom pi provider:Assistant· claude-sonnet-4-6
Now add the
models.jsonsync function and call it fromlaunchShell. Let me find the right place to insert it:Assistant· claude-sonnet-4-6
Now call it in
launchShellalongsidesyncPiSettings:Assistant· claude-sonnet-4-6
Now add Zyphra to the setup wizard:
Assistant· claude-sonnet-4-6
Clean. Here's a summary of all changes:
fnox.toml— addedzyphra_api_keysecret pulled from vault viaZYPHRA_API_KEYsrc/core/config.ts— addedzyphra: "zyphra/ZAYA1-8B"toFALLBACK_PI_MODELSsrc/runtime/pi.ts— four changes:PROVIDER_ENV_KEYS: readsZYPHRA_API_KEYPROVIDER_SETUP_HINTS: points tocloud.zyphra.com- fallback candidate list and error message updated to include
zyphra syncZyphraProvider(): whenZYPHRA_API_KEYis set, writes/merges azyphraentry into.keating/pi-config/models.jsonpointing athttps://api.zyphracloud.com/v1withapi: "openai-completions"— called automatically on everykeating shelllaunch
src/cli/setup.ts— "Zyphra Cloud" provider added to the setup wizard withZAYA1-8Bas the only preset model
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.