Skip to content

Integrate claude-code-router for multi-model support with settings UI #78

@eltmon

Description

@eltmon

Summary

Integrate claude-code-router to enable using multiple AI model providers (OpenAI, Google, Z.AI) alongside Anthropic models. Panopticon will manage the router configuration and provide a settings UI.

Installation

pan install

  • Install claude-code-router as part of the standard installation process
  • Configure it to work with Claude Code

pan sync

  • Check if claude-code-router is installed, install if missing
  • Sync any model configuration changes

Settings Page

Add a new settings page (or section) in the dashboard with:

1. Specialist Agent Models

Configure which model each specialist uses:

  • Review Agent: [model dropdown]
  • Test Agent: [model dropdown]
  • Merge Agent: [model dropdown]

2. Planning Agent Model

  • Planning Agent: [model dropdown]

3. Task Complexity Models (ties into PAN-75)

Configure models based on task difficulty:

  • Low complexity tasks: [model dropdown]
  • Medium complexity tasks: [model dropdown]
  • High complexity tasks: [model dropdown]

4. API Keys Management

Secure storage and management of API keys for providers:

  • OpenAI API Key
  • Google AI API Key
  • Z.AI API Key
  • (Anthropic key already configured via Claude Code)

Default Model Options

Include these models out of the box:

Anthropic (via Claude Code)

  • claude-opus-4
  • claude-sonnet-4
  • claude-haiku-3.5

OpenAI

  • gpt-4o
  • gpt-4o-mini
  • o1
  • o1-mini

Google

  • gemini-2.0-flash
  • gemini-1.5-pro

Z.AI

  • glm-4-plus
  • glm-4-flash

Technical Notes

  • Panopticon owns the claude-code-router configuration (users don't edit it directly)
  • Store settings in ~/.panopticon/settings.json or similar
  • API keys should be stored securely (consider using system keychain or encrypted file)
  • Settings changes should take effect without restarting agents

Acceptance Criteria

  • pan install installs claude-code-router
  • pan sync checks/installs claude-code-router if missing
  • Dashboard has settings page for model configuration
  • Can configure model per specialist agent
  • Can configure planning agent model
  • Can configure models for task complexity levels
  • Can add/edit/remove API keys for providers
  • Model dropdowns only show models for which API keys are configured
  • Configuration persists across restarts
  • Changes apply to newly spawned agents

Related

  • PAN-75 (Task complexity-based model routing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions