Skip to content

Issue 008: Real AI chat API boundary#10

Merged
cody257 merged 1 commit into
mainfrom
agent/008-real-ai-chat-api
Apr 28, 2026
Merged

Issue 008: Real AI chat API boundary#10
cody257 merged 1 commit into
mainfrom
agent/008-real-ai-chat-api

Conversation

@cody257

@cody257 cody257 commented Apr 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds /api/chat as a Vercel Function that keeps model API keys server-side.
  • Adds a provider boundary for OpenAI Responses API and Anthropic Messages API.
  • Adds prompt creation from chat messages using the negotiation context engine and prompt playbooks.
  • Adds a browser chat client toggle: default mock, optional VITE_HAGGLY_CHAT_MODE=api.
  • Adds .env.example and Vercel function packaging for prompt playbooks.

Test Plan

  • npm run lint
  • npm test
  • npm run test:e2e
  • npm run build

Notes

  • No secrets committed.
  • No auth, billing, database, rate limiter, or public-traffic hardening included.
  • Local mock mode remains the default so existing tests and previews do not need API keys.
  • Real model mode requires server env vars plus VITE_HAGGLY_CHAT_MODE=api.

API docs checked

@cody257 cody257 merged commit 5afd498 into main Apr 28, 2026
1 check passed
@cody257 cody257 deleted the agent/008-real-ai-chat-api branch April 28, 2026 21:02
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