mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6727] [MERGED] feat(decision): answer decisions with a chat model on the user's own server #7300
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7300
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6727
Author: @kolacheee
Created: 9/26/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @kolacheee
Base:
staging← Head:claude/busy-davinci-5wlp15📝 Commits (3)
af101a1feat(decision): answer decisions with a chat model on the user's own server43e7bf6Merge remote-tracking branch 'origin/staging' into claude/busy-davinci-5wlp150a89705docs(decision): name the 4 s default of a chat model Decision connection📊 Changes
21 files changed (+769 additions, -143 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/agents/custom-agents.md(+1 -1)📝
docs/connections/decision-models.md(+18 -6)📝
docs/connections/local-self-hosted.md(+3 -0)📝
docs/prompts/conditional-prompts.md(+1 -1)➕
e2e/decision-chat-connection.e2e.ts(+106 -0)📝
packages/client/src/components/connections/ConnectionEditor.tsx(+24 -12)📝
packages/client/src/hooks/use-connections.ts(+8 -2)📝
packages/client/src/lib/decision-test-message.ts(+13 -5)📝
packages/client/src/localization/locales/en.json(+6 -1)📝
packages/server/src/routes/connections.routes.ts(+26 -2)📝
packages/server/src/routes/decision.routes.ts(+1 -0)📝
packages/server/src/services/decision/decision-connection.ts(+38 -6)📝
packages/server/src/services/decision/decision-default.ts(+74 -48)📝
packages/server/src/services/decision/sidecar-decision.backend.ts(+83 -22)📝
packages/server/src/services/decision/system-one.client.ts(+48 -30)📝
packages/server/src/services/sidecar/decision-process.service.ts(+7 -1)📝
packages/shared/src/types/connection.ts(+17 -2)📝
packages/shared/src/types/decision.ts(+11 -3)➕
scripts/regressions/decision-chat-connection.regression.ts(+282 -0)...and 1 more files
📄 Description
Linked issue
Closes #6714
Why this change
/v1/systemone). Pointed at Ollama it gets a 404, every gate fails open, and Test reported it as "could not be reached".What changed
sidecar-decision.backend.ts). The request goes to the user's URL under the provider URL policy (PROVIDER_LOCAL_URLS_ENABLEDfor LAN addresses, loopback always allowed) and carries the connection's key, time limit and token budget.jev-latest). Statements go to the server one at a time, since its parallelism is unknown, so each statement's limit starts when the server takes it.http://host:11434/v1), which gets/chat/completionsappended. A bare host gets/v1/chat/completions, and a full endpoint is kept as entered. A key can be borrowed from a Custom connection only on the same origin, reusing the existing link check.postDecisionRequest(the policy-bound, abort-bounded POST) is extracted from the System One client and shared by both protocols.decision-default.tsbecomeschatBackend(), shared by local slots and the new connections.DecisionConnectioncarries itsprotocol.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated runs by the agent that prepared this PR, in a Linux container with no GPU and no real Ollama (ollama.com is not reachable there):
pnpm checkexited 0.node scripts/run-regressions.mjs --filter decision: all 11 decision regressions pass, including the newdecision-chat-connection.regression.ts. That regression uses a stand-in Ollama (OpenAI-compatible chat completions with log-probabilities, plain 404 everywhere else) and covers:http_404, which is the report;PROVIDER_LOCAL_URLS_ENABLED, and no request is sent.decision-time-limits.regression.tsneeded its source-slice end marker updated for the refactor; its assertions are unchanged.e2e/decision-chat-connection.e2e.tspasses on desktop-chromium and mobile-chromium (dark theme). It opens a Custom connection, clicks Use this model for decisions, checks the new Decision connection's source, URL, model and 4 s limit, and runs Test against the stand-in server.Still to verify by hand:
{{#if decision:"..."}}statement and confirm they answer (Debug Mode logs[decision] Chat connection request/result).logprobson/v1/chat/completions. If it does not, Test shows "No log-probabilities, so answers are only yes or no".reasoning_format/chat_template_kwargsfields are ignored rather than rejected, and that Auto switches to thinking after two failed one-token answers.PROVIDER_LOCAL_URLS_ENABLED, works with it.Docs and release impact
No docs changes needed
Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
Translated docs on the
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Version/release files updated (only if this PR includes a version bump)
CHANGELOG.md: new[Unreleased]entry.docs/connections/decision-models.md: new section "On a server you already run", a row in the options table, the new source in the setup steps, the threshold and time-limit tables, and a troubleshooting entry for the 404.docs/connections/local-self-hosted.md: a pointer to the decision option.docs-i18n: both files exist in all 10 language packs. A[docs-i18n] docs/connections/decision-models.md, docs/connections/local-self-hosted.mdfollow-up issue is still to be opened (#6667 already tracks earlierdecision-models.mdchanges).UI evidence (if applicable)
Screenshots from the e2e run (desktop and mobile, dark), to attach:
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.