Skip to content

feat: configurable ai models#43

Open
Buooy wants to merge 1 commit into
cloudflare:mainfrom
0xBuooy:feat/configurable-ai-models
Open

feat: configurable ai models#43
Buooy wants to merge 1 commit into
cloudflare:mainfrom
0xBuooy:feat/configurable-ai-models

Conversation

@Buooy
Copy link
Copy Markdown

@Buooy Buooy commented May 18, 2026

Summary

Adds centralized AI model configuration for the email agent, auto-drafting, prompt-injection scanning, and draft verification.

Changes

  • Added workers/lib/ai-config.ts with default model choices and env-var override support.
  • Replaced hard-coded model strings in the agent flow with getAIModel(...).
  • Updated isPromptInjection and verifyDraft to accept optional model overrides while preserving defaults for existing callers.
  • Added model vars to wrangler.jsonc for deploy-time tuning.

Linked to #41

Add a centralized AI model config that defines defaults for the email agent, auto-drafting, prompt-injection scanning, and draft verification. The helper supports Worker env var overrides while keeping the existing models as fallbacks.

Update the agent and AI helper call sites to resolve models through the config instead of hard-coded strings, and expose the corresponding model variables in wrangler.jsonc for deploy-time tuning.
@Buooy Buooy force-pushed the feat/configurable-ai-models branch from 5b8d3e6 to 7490476 Compare May 18, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant