Skip to content

Feature: Configurable AI model selection #41

@Buooy

Description

@Buooy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions