Skip to content

fix: make model name configurable via OPENCLAW_MODEL#1

Open
freema wants to merge 1 commit intomainfrom
fix/configurable-model
Open

fix: make model name configurable via OPENCLAW_MODEL#1
freema wants to merge 1 commit intomainfrom
fix/configurable-model

Conversation

@freema
Copy link
Copy Markdown
Owner

@freema freema commented Mar 28, 2026

Summary

Changes

  • src/config/index.ts — add model to AppConfig, parse from OPENCLAW_MODEL env var
  • src/openclaw/client.ts — accept model param in constructor, use this.model instead of hardcoded string (both sync and streaming)
  • src/a2a/executor.ts — pass config.model when creating clients
  • .env.example / docker-compose.yml — document OPENCLAW_MODEL
  • Tests — add model to all test AppConfig fixtures

Test plan

  • npm run typecheck — 0 errors
  • npm run test:run — 138/138 passed
  • npm run lint — clean
  • npm run build — success

Model was hardcoded to 'openclaw' which works for current gateways,
but should be configurable for custom agent routing setups.
Mirrors freema/openclaw-mcp#22.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@freema
Copy link
Copy Markdown
Owner Author

freema commented Mar 28, 2026

Related: freema/openclaw-mcp#22 (same fix for the MCP bridge)
Context: freema/openclaw-mcp#21 (original bug report)

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.

1 participant