Skip to content

feat: obol openclaw set-model for per-instance provider/model switching #275

@bussyjd

Description

@bussyjd

Problem

Changing an OpenClaw instance's model or provider routing requires re-onboarding (obol openclaw onboard --interactive) or manually editing the values-obol.yaml overlay. There's no quick CLI verb to switch an existing instance's model or toggle between LiteLLM-routed and direct provider access.

Proposed UX

# Switch model (still through LiteLLM)
obol openclaw set-model obol-agent --model gpt-4.1

# Switch to direct OpenAI (bypass LiteLLM)
obol openclaw set-model obol-agent --provider openai --direct --api-key sk-proj-...

# Switch back to LiteLLM-routed
obol openclaw set-model obol-agent --model claude-sonnet-4-6

Context

The infrastructure already supports both routing modes:

  • LiteLLM-routed: buildLiteLLMRoutedOverlay() — all traffic through litellm:4000/v1
  • Direct provider: buildDirectProviderOverlay() — native API access, key in per-instance Secret

Currently only accessible via obol openclaw onboard --interactive which recreates the full deployment. A set-model verb would patch the overlay and re-sync without full re-onboarding.

Scope

  • obol openclaw set-model <id> --model <name> — change primary model, keep current routing
  • obol openclaw set-model <id> --provider <name> --direct — switch to direct provider
  • obol openclaw set-model <id> --provider litellm — switch back to LiteLLM routing
  • Re-sync instance after overlay change (helmfile sync)
  • Validate model exists in LiteLLM config (for routed mode) or provider API (for direct mode)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions