omp) can use GoModel as a
custom provider. One provider block in omp’s models.yml auto-discovers every
model GoModel exposes, so you configure the gateway once instead of defining
each model by hand.
Flow:
oh-my-pi (omp) -> GoModel -> upstream model providers
Before you start
- Install oh-my-pi, for example
with
curl -fsSL https://omp.sh/install | sh. - Choose a GoModel master key for gateway administration, for example
change-me. - Make sure GoModel has an upstream credential for the models you want to use.
1. Run GoModel
Start GoModel with a master key and at least one upstream provider. This example uses Anthropic:GOMODEL_MASTER_KEY is the gateway’s bootstrap and administrator credential.
Do not put it in omp’s configuration. ANTHROPIC_API_KEY belongs to GoModel
and is used only for the upstream request.
2. Create a dedicated omp API key
Open the GoModel dashboard at http://localhost:8080/admin/dashboard and sign in withGOMODEL_MASTER_KEY. Go to
API Keys -> Create API Key, then:
- Name the key
oh-my-pi. - Set User Path to
/agents/omp. - Leave Dashboard access disabled.
- Create the key and copy the
sk_gom_...value. It is shown only once.
/agents/omp.
3. Configure omp
Create or edit~/.omp/agent/models.yml and add a gomodel provider:
discovery block makes omp fetch GoModel’s /v1/models catalog at
startup, so every model GoModel can route appears in omp automatically —
including context window and output limits from GoModel’s model metadata. You
do not list models by hand.
Restrict access to the file with chmod 600 ~/.omp/agent/models.yml. If you
prefer not to store the key inline, apiKey also accepts the name of an
environment variable (for example apiKey: GOMODEL_API_KEY) or a command
prefixed with ! whose stdout is the secret (for example
apiKey: "!op read op://dev/gomodel/api-key").
If GoModel runs on another host, replace localhost:8080 with an https://
URL, with TLS terminated at a reverse proxy or load balancer in front of
GoModel; use plain HTTP only for loopback development. Keep /v1 in the base
URL.
4. Choose a model and run omp
List what omp discovered through the gateway:<provider>/<model-id>. GoModel model IDs are already
provider-qualified (anthropic/claude-sonnet-5), so the full selector carries
two prefixes:
ok.
omp caches discovered catalogs in a local database. After adding models or
providers to GoModel, run
omp models refresh to force a fresh fetch.5. Enable reasoning effort
omp’s--thinking levels (low, medium, high, …) are sent as the
OpenAI-compatible reasoning_effort field, and GoModel translates that field
for each upstream — for Anthropic models it becomes a thinking budget, and the
model’s thinking streams back as reasoning_content, which omp renders as
thought blocks.
omp only sends reasoning_effort for models it knows are reasoning-capable,
and models discovered from a plain /v1/models list are not marked as such.
Opt them in with modelOverrides:
--thinking is silently dropped for that model.
Optional: use GoModel’s Anthropic Messages endpoint
omp can also talk to GoModel over the Anthropic wire via GoModel’s/v1/messages endpoint. Discovery is not
available on this path, so define models explicitly:
6. Check the traffic in GoModel
Open the GoModel dashboard audit logs: http://localhost:8080/admin/dashboard/audit Confirm omp’s streaming requests toPOST /v1/chat/completions under the
/agents/omp user path, and that GoModel routes them to the intended
provider. Sign in with the master key; the omp key intentionally cannot open
this page.
Troubleshooting
401 Unauthorized
The apiKey value in models.yml must be the sk_gom_... managed key. If
you referenced an environment variable by name instead, make sure that
variable is exported in the shell that launches omp.
Model not found
omp selectors need the full discovered ID including GoModel’s provider prefix:gomodel/anthropic/claude-sonnet-5, not gomodel/claude-sonnet-5.
Copy the exact ID from omp models gomodel.
New GoModel models do not appear
Runomp models refresh. omp otherwise serves the cached catalog.
--thinking has no effect
Add reasoning: true for that model under modelOverrides as shown above.
Without it omp does not send reasoning_effort, so GoModel never receives an
effort to translate.
Thinking works on Anthropic models but not others
GoModel mapsreasoning_effort per provider. Check the model’s
capabilities.reasoning flag in /v1/models metadata; non-reasoning models
ignore or reject effort values.
References
- oh-my-pi: Model and provider configuration (
models.yml) - oh-my-pi: CLI reference
- GoModel: Anthropic Messages API
Validated on August 31, 2026
This guide was validated against:- a local GoModel instance on
http://localhost:8080 - oh-my-pi
18.0.11(omp) anthropic/claude-haiku-4-5-20251001through GoModel
discovery: openai-models-listimported the full GoModel catalog (955 models) with context windows and output limitsomp -pheadless prompts and shell tool calls completed throughomp -> GoModel -> Anthropicwith a dedicated managed key- with the
modelOverridesreasoning opt-in,--thinking highproducedreasoning_effort: "high"on the wire, GoModel translated it to Anthropic thinking, and omp rendered the returnedreasoning_contentthought blocks; without the opt-in, omp omitted the field - the
api: anthropic-messagesprovider variant completed the same prompts through GoModel’s/v1/messagesendpoint