You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/AGENTS.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,6 +224,11 @@ This project uses **Make** as the primary build orchestrator. See `Makefile` for
224
224
- Always run `make typecheck` after making changes to verify types (checks both main and renderer)
225
225
-**⚠️ CRITICAL: Unit tests MUST be colocated with the code they test** - Place `*.test.ts` files in the same directory as the implementation file (e.g., `src/utils/foo.test.ts` next to `src/utils/foo.ts`). Tests in `./tests/` are ONLY for integration/E2E tests that require complex setup.
226
226
-**Don't test simple mapping operations** - If the test just verifies the code does what it obviously does from reading it, skip the test.
227
+
- ❌ **Bad**: `expect(REGISTRY.foo).toBe("bar")` - This just duplicates the implementation
228
+
- ✅ **Good**: `expect(Object.keys(REGISTRY).length).toBeGreaterThan(0)` - Tests an invariant
229
+
- ❌ **Bad**: `expect(isValid("foo")).toBe(true)` for every valid value - Duplicates implementation
- Any model from [OpenRouter Models](https://openrouter.ai/models)
40
+
41
+
**Setup:**
42
+
43
+
1. Get your API key from [openrouter.ai](https://openrouter.ai/)
44
+
2. Add to `~/.cmux/providers.jsonc`:
45
+
46
+
```jsonc
47
+
{
48
+
"openrouter": {
49
+
"apiKey":"sk-or-v1-...",
50
+
},
51
+
}
52
+
```
53
+
54
+
**Provider Routing (Advanced):**
55
+
56
+
OpenRouter can route requests to specific infrastructure providers (Cerebras, Fireworks, Together, etc.). Configure provider preferences in `~/.cmux/providers.jsonc`:
57
+
58
+
```jsonc
59
+
{
60
+
"openrouter": {
61
+
"apiKey":"sk-or-v1-...",
62
+
// Use Cerebras for ultra-fast inference
63
+
"order": ["Cerebras", "Fireworks"], // Try in order
64
+
"allow_fallbacks":true, // Allow other providers if unavailable
65
+
},
66
+
}
67
+
```
68
+
69
+
Or require a specific provider (no fallbacks):
70
+
71
+
```jsonc
72
+
{
73
+
"openrouter": {
74
+
"apiKey":"sk-or-v1-...",
75
+
"order": ["Cerebras"], // Only try Cerebras
76
+
"allow_fallbacks":false, // Fail if Cerebras unavailable
77
+
},
78
+
}
79
+
```
80
+
81
+
**Provider Routing Options:**
82
+
83
+
-`order`: Array of provider names to try in priority order (e.g., `["Cerebras", "Fireworks"]`)
84
+
-`allow_fallbacks`: Boolean - whether to fall back to other providers (default: `true`)
85
+
-`only`: Array - restrict to only these providers
86
+
-`ignore`: Array - exclude specific providers
87
+
-`require_parameters`: Boolean - only use providers supporting all your request parameters
88
+
-`data_collection`: `"allow"` or `"deny"` - control whether providers can store/train on your data
89
+
90
+
See [OpenRouter Provider Routing docs](https://openrouter.ai/docs/features/provider-routing) for details.
91
+
92
+
**Reasoning Models:**
93
+
94
+
OpenRouter supports reasoning models like Claude Sonnet Thinking. Use the thinking slider to control reasoning effort:
95
+
96
+
-**Off**: No extended reasoning
97
+
-**Low**: Quick reasoning for straightforward tasks
98
+
-**Medium**: Standard reasoning for moderate complexity (default)
99
+
-**High**: Deep reasoning for complex problems
100
+
101
+
The thinking level is passed to OpenRouter as `reasoning.effort` and works with any reasoning-capable model. See [OpenRouter Reasoning docs](https://openrouter.ai/docs/use-cases/reasoning-tokens) for details.
102
+
30
103
#### Ollama (Local)
31
104
32
105
Run models locally with Ollama. No API key required:
@@ -68,6 +141,10 @@ All providers are configured in `~/.cmux/providers.jsonc`. Example configuration
68
141
"openai": {
69
142
"apiKey":"sk-...",
70
143
},
144
+
// Required for OpenRouter models
145
+
"openrouter": {
146
+
"apiKey":"sk-or-v1-...",
147
+
},
71
148
// Optional for Ollama (only needed for custom URL)
0 commit comments