Skip to content

feat(chat): integrate Cloudflare Clairic extraction model into Agent AJ - #752

Open
codercatdev wants to merge 3 commits into
devfrom
integrate_clairic_extraction_model
Open

codercatdev wants to merge 3 commits into
devfrom
integrate_clairic_extraction_model

Conversation

@codercatdev

Copy link
Copy Markdown
Contributor

Integrates Cloudflare's @cf/cloudflare/clairic extraction model into Agent AJ (/api/chat) using the Extract -> Route -> Synthesize cascade pattern:

  • Uses @cf/cloudflare/clairic via env.AI (with deterministic fast-path fallback) to extract structured intent, contentType, searchQuery, and limit parameters in a single forward pass.
  • Skips remote Sanity Context MCP connection and tool-calling loops for recent_content, top_videos, topic_search, and author_lookup queries, pre-fetching Sanity results directly and streaming a single tool-free synthesis pass.
  • Preserves full Sanity Context MCP tool-calling loop for joke_or_kb and complex queries.
  • Adds E2E test 7.20 covering Clairic extraction and fast-path fallback.

@codercatdev
codercatdev force-pushed the integrate_clairic_extraction_model branch from 8a1f4fe to 0dd43b8 Compare October 21, 2026 04:43
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

⚡ Cloudflare Worker Preview Ready!

Environment URL
PR Preview https://1cf61f22-codingcatdev-dev.codingcatdev.workers.dev
Dev Custom Domain https://dev.codingcat.dev
  • Worker Version ID: 1cf61f22-c7ed-4a39-9842-b23442ac345b
  • Protection: Restricted to @codingcat.dev accounts via Cloudflare Zero Trust Access

@codercatdev
codercatdev force-pushed the integrate_clairic_extraction_model branch from 040edd5 to 215fe85 Compare October 21, 2026 06:33

This branch has not been deployed

No deployments
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