[PR #5709] [MERGED] fix: support NanoGPT embeddings and reasoning controls #6896

Closed
opened 2026-10-23 04:14:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5709
Author: @Gunterlie
Created: 8/31/2026
Status: ✅ Merged
Merged: 8/31/2026
Merged by: @Gunterlie

Base: staging ← Head: vector-identity-lost


📝 Commits (1)

  • 2bbde51 fix: support NanoGPT embeddings and reasoning controls

📊 Changes

4 files changed (+94 additions, -4 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 packages/server/src/services/llm/base-provider.ts (+8 -4)
📝 packages/server/src/services/llm/providers/openai.provider.ts (+15 -0)
📝 scripts/regressions/provider-compat.regression.ts (+69 -0)

📄 Description

$## Summary\n\nFixes NanoGPT lorebook vectorization and agent reasoning controls.\n\n## Why\n\nNanoGPT embedding requests require x-api-key, while the shared embedding path sent only a Bearer header. Agent requests also need an explicit reasoning_effort: "none" when reasoning is disabled. GLM 5.3 Flash remains an exception because NanoGPT requires reasoning for that model.\n\n## Changes\n\n- Send x-api-key on NanoGPT embedding requests.\n- Send reasoning_effort: "none" for explicit NanoGPT reasoning-off requests.\n- Preserve enable_thinking: true for NanoGPT GLM 5.3 Flash.\n- Add provider regression coverage.\n\nFixes #5688\nFixes #5582\n\n## Verification\n\n- pnpm install\n- pnpm format:check\n- pnpm build:shared && node ./scripts/run-regressions.mjs --filter scripts/regressions/provider-compat.regression.ts\n- pnpm check\n\n## Manual verification\n\n- Manually verify lorebook vectorization with a NanoGPT embedding model.\n- Manually verify an agent with a NanoGPT non-reasoning model.\n- Manually verify NanoGPT GLM 5.3 Flash still sends mandatory reasoning.\n

Summary by CodeRabbit

  • Bug Fixes
    • Fixed NanoGPT lorebook vectorization requests so authentication headers are sent correctly.
    • Fixed NanoGPT requests with reasoning disabled to explicitly disable reasoning.
    • Preserved mandatory reasoning behavior for GLM 5.3 Flash models.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5709 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 8/31/2026 **Status:** ✅ Merged **Merged:** 8/31/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `vector-identity-lost` --- ### 📝 Commits (1) - [`2bbde51`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2bbde5142426aa540a34bebf5b2450c4f567435e) fix: support NanoGPT embeddings and reasoning controls ### 📊 Changes **4 files changed** (+94 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `packages/server/src/services/llm/base-provider.ts` (+8 -4) 📝 `packages/server/src/services/llm/providers/openai.provider.ts` (+15 -0) 📝 `scripts/regressions/provider-compat.regression.ts` (+69 -0) </details> ### 📄 Description $## Summary\n\nFixes NanoGPT lorebook vectorization and agent reasoning controls.\n\n## Why\n\nNanoGPT embedding requests require `x-api-key`, while the shared embedding path sent only a Bearer header. Agent requests also need an explicit `reasoning_effort: "none"` when reasoning is disabled. GLM 5.3 Flash remains an exception because NanoGPT requires reasoning for that model.\n\n## Changes\n\n- Send `x-api-key` on NanoGPT embedding requests.\n- Send `reasoning_effort: "none"` for explicit NanoGPT reasoning-off requests.\n- Preserve `enable_thinking: true` for NanoGPT GLM 5.3 Flash.\n- Add provider regression coverage.\n\nFixes #5688\nFixes #5582\n\n## Verification\n\n- `pnpm install`\n- `pnpm format:check`\n- `pnpm build:shared && node ./scripts/run-regressions.mjs --filter scripts/regressions/provider-compat.regression.ts`\n- `pnpm check`\n\n## Manual verification\n\n- Manually verify lorebook vectorization with a NanoGPT embedding model.\n- Manually verify an agent with a NanoGPT non-reasoning model.\n- Manually verify NanoGPT GLM 5.3 Flash still sends mandatory reasoning.\n <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed NanoGPT lorebook vectorization requests so authentication headers are sent correctly. * Fixed NanoGPT requests with reasoning disabled to explicitly disable reasoning. * Preserved mandatory reasoning behavior for GLM 5.3 Flash models. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:14:42 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6896
No description provided.