Skip to content

refactor(chat): extract the assistant service from the chat route (no behaviour change) - #223

Merged
Kumar2421 merged 2 commits into
mainfrom
refactor/assistant-service
Oct 23, 2026
Merged

Kumar2421 merged 2 commits into
mainfrom
refactor/assistant-service

Conversation

@Kumar2421

Copy link
Copy Markdown
Owner

Splits the 222-line app/api/chat/route.ts into lib/domain/assistant/ with named seams (types, modelSelection returning an ordered candidate list with a stub shouldFallback, credential/credit ports, prompt builder, tool registry + DataPort factory, error mapping with classifyProviderError, service, platform/self-host adapters) so the model-policy, security-gateway, streaming and persistence PRs can proceed in parallel. Route is now a thin handler. No behaviour change: same status codes, JSON shape, charge point and messages. 38 new characterization tests with fake ports; 1911 tests pass; existing chat tests untouched. Not run against real providers/DB.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
okara-alternative Ready Ready Preview Oct 23, 2026 11:56am UTC

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-23T11:55:27.720151Z
We couldn’t complete this review. Comment @codex review to try again.
c913b6b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Kumar2421
Kumar2421 merged commit e0347a9 into main Oct 23, 2026
4 checks passed
@Kumar2421
Kumar2421 deleted the refactor/assistant-service branch October 23, 2026 11:58

This branch was successfully deployed

1 active deployment
Preview — c913b6b4 Deployed Oct 23, 2026 by vercel[bot]
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