cloudflare / cloudflare/agentic-inbox
Feature: Configurable AI model selection
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 964
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
AI model choices are currently hard-coded in the Worker code. We should centralise model selection so the email agent, auto-drafting flow, prompt-injection scanner, and draft verifier can each use a default model while also supporting deploy-time overrides.
## Proposed Changes
- Add a centralized AI model config module with defaults for:
- Email agent chat
- Auto-draft generation
- Prompt-injection scanning
- Draft verification
- Support Worker env var overrides for each model.
- Replace hard-coded model strings in agent and AI helper call sites.
- Add the corresponding model variables to `wrangler.jsonc`.
## Acceptance Criteria
- Model defaults are defined in one place.
- Existing behavior remains unchanged when no overrides are provided.
- Each model can be overridden via Worker vars.
- Typecheck passes.
Contributor guide
Assessment
This issue has not been assessed yet.