Skip to content

feat: add interactive model addition to model map#100

Merged
laynepenney merged 1 commit intomainfrom
feat/modelmap-add
Jan 23, 2026
Merged

feat: add interactive model addition to model map#100
laynepenney merged 1 commit intomainfrom
feat/modelmap-add

Conversation

@laynepenney
Copy link
Copy Markdown
Collaborator

Summary

Add /modelmap add command to add models interactively without editing YAML files.

Usage

/modelmap add <name> <provider> <model> [description]
/modelmap add --global <name> <provider> <model> [description]

Examples

# Add to project config
/modelmap add coder ollama-cloud qwen3-coder:480b-cloud

# Add to global config with description
/modelmap add --global fast anthropic claude-3-5-haiku-latest "Quick tasks"

# Then use anywhere
/switch coder
/switch fast

Features

  • Creates config file if it doesn't exist (minimal config with just models section)
  • Validates provider name (anthropic, openai, ollama, ollama-cloud, runpod)
  • Prevents duplicate model names
  • Supports --global flag for ~/.codi/models.yaml
  • Shows usage hint after adding

Test plan

  • Build passes
  • All 1781 tests pass
  • /modelmap add validates provider
  • /modelmap add --global creates ~/.codi/models.yaml if needed

🤖 Generated with Claude Code

Add `/modelmap add` command to add models without editing YAML files.

Usage:
  /modelmap add <name> <provider> <model> [description]
  /modelmap add --global <name> <provider> <model> [description]

Examples:
  /modelmap add coder ollama-cloud qwen3-coder:480b-cloud
  /modelmap add --global fast anthropic claude-3-5-haiku-latest "Quick tasks"

Features:
- Creates config file if it doesn't exist
- Validates provider name
- Prevents duplicate model names
- Supports --global flag for ~/.codi/models.yaml
- Shows usage hint after adding

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@laynepenney
Copy link
Copy Markdown
Collaborator Author

Self-Review

  • ✅ Build passes
  • ✅ All 1781 tests pass
  • ✅ Provider validation implemented
  • ✅ Duplicate name detection works
  • ✅ Creates minimal config if file doesn't exist
  • ✅ --global flag works for both add and init
  • ✅ Output shows usage hint (/switch <name>)
  • No issues found. Ready to merge.

@laynepenney laynepenney merged commit 296aa21 into main Jan 23, 2026
2 of 4 checks passed
@laynepenney laynepenney deleted the feat/modelmap-add branch January 23, 2026 12:55
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