Centralize model ID configuration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 197
- Forks
- 51
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 94
Description
Why
Model IDs are currently hardcoded in three independent places, with no shared symbol or single source of truth:
| File | Line | Model |
|---|---|---|
| `src/lib/agent/agent-interface.ts` | 755-758 | `claude-opus-4-6` / `claude-sonnet-4-6` (selected by integrationLabel) |
| `src/lib/agent/mcp-prompt-streaming.ts` | 34 | `claude-sonnet-4-6` |
| `src/lib/agent/triage-provider.ts` | 21 | `claude-haiku-4-5-20251001` |
Failure mode
When the LLM gateway adds, renames, or removes a model, all three sites need updating by people who may not know the others exist. This is especially risky for the triage path — a silent 404 there triggers the fail-closed path, which over-blocks user runs.
The format also drifts: triage uses the fully-dated SKU (`claude-haiku-4-5-20251001`); the others use bare IDs (`claude-sonnet-4-6`). No convention is enforced.
Proposal
Add `src/lib/agent/models.ts` (or similar leaf module) that exports named constants:
```ts
export const AGENT_DEFAULT_MODEL = 'claude-sonnet-4-6';
export const AGENT_PREMIUM_MODEL = 'claude-opus-4-6';
export const MCP_STREAMING_MODEL = 'claude-sonnet-4-6';
export const TRIAGE_MODEL = 'claude-haiku-4-5-20251001';
```
Update all three call sites to import from here. Future model decisions land in one file.
Out of scope
- Gateway capability detection (whether a model is routed)
- Per-program model overrides
🤖 Generated with Claude Code
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the three listed call sites: src/lib/agent/agent-interface.ts, src/lib/agent/mcp-prompt-streaming.ts, and src/lib/agent/triage-provider.ts. Add the named model constants in src/lib/agent/models.ts or a similar leaf module, update each call site to import them, and run the project’s existing checks to confirm behavior is unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100