Skip to content

Dev - #136

Merged
rekabytes merged 3 commits into
mainfrom
dev
Apr 29, 2026
Merged

Dev#136
rekabytes merged 3 commits into
mainfrom
dev

Conversation

@rekabytes

Copy link
Copy Markdown
Owner

📝 Description

Brief description of what this PR does.

🔗 Related Issue

Fixes #(issue number)

🏷️ Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🧹 Code refactoring (no functional changes)
  • 🧪 Test update (adding or updating tests)

✅ Checklist

  • I have read the Contributing Guidelines
  • My branch is created from dev (not main)
  • I have run pnpm lint:fix
  • I have run pnpm typecheck
  • I have tested my changes locally
  • My code follows the project's coding standards
  • I have updated documentation (if applicable)

📸 Screenshots (if applicable)

Add screenshots to help explain your changes.

🧪 How to Test

Steps to test this PR:

  1. ...
  2. ...
  3. ...

📝 Additional Notes

Any additional information reviewers should know.

rekabytes and others added 3 commits April 20, 2026 09:40
- Add Next.js server-side API route at /api/chat/glm-fallback that proxies
  to GLM (model/base URL/key all configurable via env vars, never public)
- Refactor chat-stream.ts: extract shared SSE reader, add fallback logic
  that triggers on network errors, HTTP errors, or backend error deltas
- Detect backend AI failure by matching the exact error stream_delta text
  rather than an SSE error event (backend sends errors as stream content)
- Skip messagesQuery.refetch() after GLM response to prevent the backend's
  saved error message from overwriting the GLM response in the UI
- Append a "not saved" notice at the end of every GLM fallback response
- GLM system prompt includes full Kalori API reference and strict topic rules
- Add GLM_BASE_URL, GLM_API_KEY, GLM_MODEL to .env.example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…norepo

working-directory: packages/kal-frontend caused the path to be applied
twice — once by the shell and once by Vercel reading rootDirectory from
project config, producing .../packages/kal-frontend/packages/kal-frontend.

Running all vercel commands from repo root lets Vercel resolve rootDirectory
correctly. Also adds pnpm install and shared dep builds to the deploy job
which were previously missing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rekabytes
rekabytes merged commit a3f7ff7 into main Apr 29, 2026
5 checks passed
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