Skip to content

feat: configurable model selection#677

Closed
garettmd wants to merge 6 commits intoqwibitai:mainfrom
garettmd:gar-36-model-selection
Closed

feat: configurable model selection#677
garettmd wants to merge 6 commits intoqwibitai:mainfrom
garettmd:gar-36-model-selection

Conversation

@garettmd
Copy link
Copy Markdown

@garettmd garettmd commented Mar 3, 2026

Summary

  • Add DEFAULT_MODEL env var in .env to set the agent model globally
  • Add /model Telegram command to view/change model at runtime (persists across restarts)
  • Support shorthand aliases: sonnet, opus, haiku
  • Model flows: config → orchestrator state (DB-backed) → container stdin → SDK query()

Closes GAR-36

Files Changed

  • src/config.ts — read DEFAULT_MODEL from .env
  • src/index.ts — model state management, getModel()/setModel()
  • src/channels/telegram.ts/model command handler
  • src/container-runner.tsmodel?: string on ContainerInput
  • container/agent-runner/src/index.ts — pass model to SDK query()
  • .env.exampleDEFAULT_MODEL= placeholder
  • docs/CUSTOM-CONTAINER.md — document model selection
  • .claude/skills/update-from-upstream/SKILL.md — merge check for model config

Test plan

  • Set DEFAULT_MODEL=claude-sonnet-4-6 in .env, restart — agents use Sonnet
  • /model shows current model
  • /model opus switches to Opus
  • /model default resets to .env value
  • Restart NanoClaw — model override persists from DB

🤖 Generated with Claude Code

garettmd and others added 6 commits March 2, 2026 17:10
Add Telegram as an input/output channel via Grammy, alongside WhatsApp.
Supports TELEGRAM_ONLY mode to run without WhatsApp entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add rootless Docker compatibility (UID remapping, world-writable mounts).
Add GH_TOKEN and LINEAR_API_KEY to container secrets for CLI auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Layered Dockerfile.custom extends base image without modifying upstream.
Add docs and /update-from-upstream skill for managing updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add DEFAULT_MODEL env var and runtime /model Telegram command for
switching the agent SDK model without restarting. Model state persists
in the DB across restarts.

Closes GAR-36

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@garettmd garettmd closed this Mar 3, 2026
@garettmd garettmd deleted the gar-36-model-selection branch March 3, 2026 20:48
@garettmd garettmd restored the gar-36-model-selection branch March 3, 2026 21:20
@akhy
Copy link
Copy Markdown

akhy commented Mar 4, 2026

Why is it closed?

I have just implemented the same in my customized build, wonder if this feature should be available by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants