#Model selection

1 messages · Page 1 of 1 (latest)

lusty cloud
#

What models should I run for my main agent?
I have access via codex subscription and Anthropic sub so pricing/usage is a concern, I heard sonnet 3.5 is good?

frank yokeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

worldly oliveBOT
#

If pricing matters, I’d optimize for tool reliability first on your main agent, then push “cheap” onto background stuff.

  • Main agent: a “Sonnet-class” Anthropic model is usually the sweet spot (good reasoning + generally solid tool calling). So yes — the idea that “Sonnet 3.5 is good” has been true for a lot of people, but model lineups change fast, so I’d sanity-check what folks are currently running this week in this channel.
  • Coding-heavy work: if you’ve got a Codex subscription, it can be great to use that for coding tasks specifically while keeping the main agent on the model that behaves best with tools + browsing + long, messy context.
  • Cost control: run a cheaper model for background/automation (heartbeats, cron reminders, lightweight checks), and reserve the pricier model for interactive “I need it to actually succeed” runs.

Two quick questions so the recommendation matches your use:

  1. Is your main agent mostly coding, or mostly browsing / automation / chat + planning?
  2. Do you care more about speed or accuracy/tool-success rate?

Docs worth skimming (esp. the community-notes section):
https://docs.openclaw.ai/concepts/models
https://docs.openclaw.ai/concepts/models#model-discussions-community-notes

lusty cloud
#

I wouldn’t even know how to answer you, write 5 questions for my main agent and I’ll reply with his respond

worldly oliveBOT
#

Paste these 5 questions to your main agent and reply here with its answers (and any extra notes it adds):

  1. What do you actually do most of the time?
    Pick up to 3: (a) coding/debugging (b) writing/brainstorming (c) planning/project mgmt (d) web browsing/research (e) automation/tool use (f) chat/companion

  2. Which tools do you use regularly inside OpenClaw?
    List any: browser, exec, filesystem (read/write/edit), messaging, cron, nodes/camera/screen, etc.
    Also: do you need “tool calling never breaks” more than “best reasoning”?

  3. What are your hard constraints?

    • Max budget per day/week (roughly)
    • Preferred latency: fast (<10s) / medium / don’t care
    • Context size needs: small / medium / huge (lots of logs + docs)
  4. What failure mode hurts you most?
    Choose one: (a) wrong answer (b) tool-call mistakes (c) slow responses (d) too expensive (e) gets stuck / doesn’t finish

#
  1. Given I have access to both Anthropic and Codex, propose a 2–3 tier model plan (Main / Cheap background / “Big gun”), and say why for each tier.
    Include: what to run for daily use vs. what to switch to when things get messy.

Reply with the 5 answers and I’ll map that to a concrete “main + backup + cheap tasks” recommendation.

lusty cloud
#

How do I switch out my google api key

worldly oliveBOT
#

For OpenClaw, the Google Gemini “API key” is the env var GEMINI_API_KEY (provider google).

To switch/rotate it:

  1. Update the key where the Gateway runs
  • If you run the Gateway as a daemon/service: edit ~/.openclaw/.env on the gateway host and replace the value, e.g.
    • GEMINI_API_KEY=...new key...
  • If you’re on Fly/Render/Docker/systemd/etc: update the service secret/env var there instead.

Note: OpenClaw loads .env (CWD + ~/.openclaw/.env) only for missing vars—so if GEMINI_API_KEY is already set in the service environment, changing the file won’t matter until you change/remove the existing env var.

  1. Restart the Gateway (so it picks up the new env var)

  2. Verify

  • Run: openclaw models status (optionally --json / --probe-provider google)

Docs: https://docs.openclaw.ai/concepts/model-providers (Google Gemini section) + https://docs.openclaw.ai/help/environment