Skip to content

Commit 28ee8c5

Browse files
committed
Refresh model mappings and bump version to 0.1.1
1 parent 10f5c5c commit 28ee8c5

16 files changed

Lines changed: 118 additions & 73 deletions

.github/copilot-instructions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ routesmith is a HOST-AWARE skill layer, NOT a universal cross-provider broker.
1919
4. **Graceful fallback** — If switching is unsupported, use prompt strategy.
2020
5. **Deterministic planning** — Planner works without API calls.
2121

22+
## Versioning Rule
23+
24+
- Any code change must also update the package version in `pyproject.toml`.
25+
- Do not leave behavior-changing code edits at the same published version.
26+
- When making code changes, treat the version bump as part of the same change.
27+
2228
## Package Structure
2329

2430
- `src/routesmith/` — Main package

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.1.1] - 2026-05-07
6+
7+
### Changed
8+
- Refreshed host model mappings and README examples to current public model lineups.
9+
- Centralized runtime version reporting so package metadata and server responses stay in sync with `pyproject.toml`.
10+
511
## [0.1.0] - 2026-05-07
612

713
### Added

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Most coding agents are stuck on one model. Mixed tasks (plan → code → test
2626

2727
| Host | Models | Strategy |
2828
|------|--------|----------|
29-
| Claude Code | Opus / Sonnet / Haiku | Dynamic model switching |
30-
| Codex | o3 / codex-mini / GPT-4.1 | Dynamic model switching |
31-
| Copilot | Host-controlled | Prompt optimization |
32-
| Cursor | User-controlled | Prompt optimization |
33-
| Aider | Multi-provider | Dynamic model switching |
29+
| Claude Code | Claude Opus 4.7 / Sonnet 4.6 / Haiku 4.5 | Dynamic model switching |
30+
| Codex | GPT-5.5 / GPT-5.4 / GPT-5.3-Codex | Dynamic model switching |
31+
| Copilot | Claude 4.7 / GPT-5.5 / Gemini 3.1 Pro (plan-dependent) | Prompt optimization |
32+
| Cursor | Claude 4.7 / GPT-5.5 / GPT-5.3-Codex / Gemini 3.1 Pro | Prompt optimization |
33+
| Aider | Claude 4.7 / GPT-5.5 / Gemini 3.1 Pro | Dynamic model switching |
3434

3535
## Quickstart
3636

@@ -108,10 +108,10 @@ Instead of hardcoding model names, routesmith uses abstract capability classes:
108108

109109
| Class | Use Case | Example Models |
110110
|-------|----------|----------------|
111-
| `deep_reasoning` | Planning, architecture, review | Claude Opus, o3 |
112-
| `coding` | Implementation, testing, refactoring | Claude Sonnet, codex-mini |
113-
| `balanced` | Documentation, general tasks | Claude Sonnet, GPT-4.1 |
114-
| `fast` | Formatting, simple transforms | Claude Haiku, GPT-4.1-mini |
111+
| `deep_reasoning` | Planning, architecture, review | Claude Opus 4.7, GPT-5.5 |
112+
| `coding` | Implementation, testing, refactoring | Claude Sonnet 4.6, GPT-5.3-Codex |
113+
| `balanced` | Documentation, general tasks | Claude Sonnet 4.6, GPT-5.4 |
114+
| `fast` | Formatting, simple transforms | Claude Haiku 4.5, GPT-5.4-mini |
115115

116116
Each host adapter maps these to actual available models.
117117

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "routesmith"
7-
version = "0.1.0"
7+
version = "0.1.1"
88
description = "Host-aware auto-routing skill library for IDEs and coding agents."
99
readme = "README.md"
1010
license = "MIT"

src/routesmith/__init__.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""routesmith - Host-aware auto-routing skill library for IDEs and coding agents."""
22

3+
from importlib.metadata import PackageNotFoundError, version as package_version
4+
from pathlib import Path
5+
36
from routesmith.types import (
47
CapabilityClass,
58
HostCapabilities,
@@ -17,7 +20,25 @@
1720
from routesmith.router import Router
1821
from routesmith.hosts.detector import detect_host, get_host_capabilities
1922

20-
__version__ = "0.1.0"
23+
24+
def _read_version_from_pyproject() -> str:
25+
"""Fallback to pyproject.toml when package metadata is unavailable."""
26+
pyproject_path = Path(__file__).resolve().parents[2] / "pyproject.toml"
27+
try:
28+
for line in pyproject_path.read_text(encoding="utf-8").splitlines():
29+
stripped = line.strip()
30+
if stripped.startswith("version = "):
31+
return stripped.split("=", 1)[1].strip().strip('"').strip("'")
32+
except OSError:
33+
pass
34+
return "0.1.1"
35+
36+
37+
try:
38+
__version__ = package_version("routesmith")
39+
except PackageNotFoundError:
40+
__version__ = _read_version_from_pyproject()
41+
2142
__all__ = [
2243
"run",
2344
"explain_route",

src/routesmith/hosts/aider.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,21 @@ class AiderHostAdapter(BaseHostAdapter):
1818
"""Adapter for Aider coding assistant."""
1919

2020
MODEL_MAP: dict[CapabilityClass, str] = {
21-
CapabilityClass.DEEP_REASONING: "claude-opus-4-20250514",
22-
CapabilityClass.CODING: "claude-sonnet-4-20250514",
23-
CapabilityClass.BALANCED: "claude-sonnet-4-20250514",
24-
CapabilityClass.FAST: "claude-haiku-3-5-20241022",
21+
CapabilityClass.DEEP_REASONING: "claude-opus-4-7",
22+
CapabilityClass.CODING: "gpt-5.3-codex",
23+
CapabilityClass.BALANCED: "claude-sonnet-4-6",
24+
CapabilityClass.FAST: "claude-haiku-4-5",
2525
}
2626

2727
AVAILABLE_MODELS = [
28-
"claude-opus-4-20250514",
29-
"claude-sonnet-4-20250514",
30-
"claude-haiku-3-5-20241022",
31-
"gpt-4.1",
32-
"gpt-4.1-mini",
33-
"o3",
28+
"claude-opus-4-7",
29+
"claude-sonnet-4-6",
30+
"claude-haiku-4-5",
31+
"gpt-5.5",
32+
"gpt-5.4",
33+
"gpt-5.4-mini",
34+
"gpt-5.3-codex",
35+
"gemini-3.1-pro",
3436
]
3537

3638
def detect(self) -> HostDetectionResult:

src/routesmith/hosts/claude_code.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ class ClaudeCodeHostAdapter(BaseHostAdapter):
1919

2020
# Claude-family model mapping by capability class
2121
MODEL_MAP: dict[CapabilityClass, str] = {
22-
CapabilityClass.DEEP_REASONING: "claude-opus-4-20250514",
23-
CapabilityClass.CODING: "claude-sonnet-4-20250514",
24-
CapabilityClass.BALANCED: "claude-sonnet-4-20250514",
25-
CapabilityClass.FAST: "claude-haiku-3-5-20241022",
22+
CapabilityClass.DEEP_REASONING: "claude-opus-4-7",
23+
CapabilityClass.CODING: "claude-sonnet-4-6",
24+
CapabilityClass.BALANCED: "claude-sonnet-4-6",
25+
CapabilityClass.FAST: "claude-haiku-4-5",
2626
}
2727

2828
AVAILABLE_MODELS = [
29-
"claude-opus-4-20250514",
30-
"claude-sonnet-4-20250514",
31-
"claude-haiku-3-5-20241022",
29+
"claude-opus-4-7",
30+
"claude-sonnet-4-6",
31+
"claude-haiku-4-5",
3232
]
3333

3434
def detect(self) -> HostDetectionResult:
@@ -95,7 +95,7 @@ def _detect_current_model(self) -> str | None:
9595
if model:
9696
return model
9797
# Default assumption for Claude Code
98-
return "claude-sonnet-4-20250514"
98+
return "claude-sonnet-4-6"
9999

100100
def get_available_models(self) -> list[str]:
101101
"""Get available Claude models."""

src/routesmith/hosts/codex.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ class CodexHostAdapter(BaseHostAdapter):
1818
"""Adapter for OpenAI Codex CLI / OpenAI-native environments."""
1919

2020
MODEL_MAP: dict[CapabilityClass, str] = {
21-
CapabilityClass.DEEP_REASONING: "o3",
22-
CapabilityClass.CODING: "codex-mini",
23-
CapabilityClass.BALANCED: "gpt-4.1",
24-
CapabilityClass.FAST: "gpt-4.1-mini",
21+
CapabilityClass.DEEP_REASONING: "gpt-5.5",
22+
CapabilityClass.CODING: "gpt-5.3-codex",
23+
CapabilityClass.BALANCED: "gpt-5.4",
24+
CapabilityClass.FAST: "gpt-5.4-mini",
2525
}
2626

2727
AVAILABLE_MODELS = [
28-
"o3",
29-
"codex-mini",
30-
"gpt-4.1",
31-
"gpt-4.1-mini",
32-
"gpt-4.1-nano",
28+
"gpt-5.5",
29+
"gpt-5.4",
30+
"gpt-5.4-mini",
31+
"gpt-5.3-codex",
32+
"gpt-5.3-codex-spark",
3333
]
3434

3535
def detect(self) -> HostDetectionResult:
@@ -80,6 +80,7 @@ def get_capabilities(self) -> HostCapabilities:
8080
notes=[
8181
"Codex supports OpenAI-family models only.",
8282
"Model can be set via CLI flags or environment.",
83+
"GPT-5.5 is current top-end when available; GPT-5.4 is the broad fallback.",
8384
"AGENTS.md repo instructions are supported.",
8485
],
8586
)
@@ -93,7 +94,7 @@ def _detect_current_model(self) -> str | None:
9394
model = os.environ.get("CODEX_MODEL") or os.environ.get("OPENAI_MODEL")
9495
if model:
9596
return model
96-
return "codex-mini"
97+
return "gpt-5.4"
9798

9899
def get_available_models(self) -> list[str]:
99100
"""Get available OpenAI models."""
@@ -134,13 +135,16 @@ def resolve_capability_class(self, capability: CapabilityClass) -> str | None:
134135
def apply_prompt_strategy(self, task: TaskNode) -> dict:
135136
"""Generate Codex-specific prompt strategy."""
136137
model = self.resolve_capability_class(task.preferred_capability_class)
138+
hints = [
139+
f"Use {model} for {task.type.value} tasks.",
140+
f"Codex supports switching to this model via --model flag.",
141+
]
142+
if model == "gpt-5.5":
143+
hints.append("If GPT-5.5 is unavailable in your account, fall back to gpt-5.4.")
137144
return {
138145
"task_id": task.id,
139146
"task_type": task.type.value,
140147
"strategy": "model_switch",
141148
"target_model": model,
142-
"hints": [
143-
f"Use {model} for {task.type.value} tasks.",
144-
f"Codex supports switching to this model via --model flag.",
145-
],
149+
"hints": hints,
146150
}

src/routesmith/hosts/copilot.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ class CopilotHostAdapter(BaseHostAdapter):
2020

2121
# Copilot may expose multiple models but switching is host-controlled
2222
MODEL_MAP: dict[CapabilityClass, str] = {
23-
CapabilityClass.DEEP_REASONING: "claude-sonnet-4",
24-
CapabilityClass.CODING: "claude-sonnet-4",
25-
CapabilityClass.BALANCED: "gpt-4.1",
26-
CapabilityClass.FAST: "gpt-4.1-mini",
23+
CapabilityClass.DEEP_REASONING: "claude-opus-4.7",
24+
CapabilityClass.CODING: "claude-sonnet-4.6",
25+
CapabilityClass.BALANCED: "gpt-5.4",
26+
CapabilityClass.FAST: "gpt-5-mini",
2727
}
2828

2929
AVAILABLE_MODELS = [
30-
"claude-sonnet-4",
31-
"gpt-4.1",
32-
"gpt-4.1-mini",
33-
"o3-mini",
30+
"claude-opus-4.7",
31+
"claude-sonnet-4.6",
32+
"gpt-5.5",
33+
"gpt-5.4",
34+
"gpt-5-mini",
35+
"gemini-3.1-pro",
3436
]
3537

3638
def detect(self) -> HostDetectionResult:
@@ -80,6 +82,7 @@ def get_capabilities(self) -> HostCapabilities:
8082
model_family="mixed",
8183
notes=[
8284
"Copilot model selection is controlled by the host IDE.",
85+
"Available models vary by Copilot plan and rollout stage.",
8386
"Direct model switching from skill code is not reliably supported.",
8487
"Use .github/copilot-instructions.md and prompt files for guidance.",
8588
"Task decomposition and prompt optimization are the primary strategies.",

src/routesmith/hosts/cursor.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ class CursorHostAdapter(BaseHostAdapter):
1818
"""Adapter for Cursor IDE."""
1919

2020
MODEL_MAP: dict[CapabilityClass, str] = {
21-
CapabilityClass.DEEP_REASONING: "claude-sonnet-4",
22-
CapabilityClass.CODING: "claude-sonnet-4",
23-
CapabilityClass.BALANCED: "gpt-4.1",
24-
CapabilityClass.FAST: "cursor-small",
21+
CapabilityClass.DEEP_REASONING: "claude-opus-4.7",
22+
CapabilityClass.CODING: "gpt-5.3-codex",
23+
CapabilityClass.BALANCED: "claude-sonnet-4.6",
24+
CapabilityClass.FAST: "composer-2",
2525
}
2626

2727
AVAILABLE_MODELS = [
28-
"claude-sonnet-4",
29-
"gpt-4.1",
30-
"gpt-4.1-mini",
31-
"cursor-small",
28+
"claude-opus-4.7",
29+
"claude-sonnet-4.6",
30+
"gpt-5.5",
31+
"gpt-5.3-codex",
32+
"gemini-3.1-pro",
33+
"composer-2",
3234
]
3335

3436
def detect(self) -> HostDetectionResult:

0 commit comments

Comments
 (0)