mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2264] [Issue]: 08-PRESET-CONTRACT-advanced-generation-params downgrades xhigh reasoning #1105
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#1105
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?
Originally created by @Promansis on GitHub (Jun 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2264
Originally assigned to: @Xelvanis on GitHub.
Summary
08-PRESET-CONTRACT-advanced-generation-params: prompt preset advanced generation parameters mostly survive schema, merge, prompt formatting, and provider request mapping, but the refactor Rust LLM provider contract downgradesreasoningEffort: "xhigh"and"maximum"to"high"before sending OpenAI/OpenRouter reasoning requests.Linked parity target: #2259.
Expected behavior
Legacy behavior:
Prompt preset generation parameters include reasoning, verbosity, service tier, assistant prefill, custom parameters, max context, stop sequences, thoughts/showThoughts, strict role formatting, and single-user-message flags. For reasoning, legacy resolves
reasoningEffort: "maximum"to"xhigh"for supported newer models and to"high"otherwise.The refactor should preserve the same advanced generation-parameter contract, including sending
xhighreasoning effort where the current provider/model contract supports it.Actual behavior
Refactor behavior:
The refactor schema and merge path carry the listed advanced generation fields, and most provider mappings exist. However, the Rust LLM provider helper accepts
reasoningEffortvalues"xhigh"and"maximum"but normalizes both to"high"before the OpenAI/OpenRouter reasoning send path. That loses the legacy-supportedxhighreasoning level for eligible models.Steps to reproduce
reasoningEffort: "xhigh"or"maximum"for an eligible OpenAI/OpenRouter reasoning model.src-tauri/crates/llm/src/lib.rs."high"instead of preserving/resolving to"xhigh".Impact area
Environment
refactorxhighsupportLogs, screenshots, or video
Static parityscan proof:
main:packages/shared/src/schemas/prompt.schema.ts.main:packages/server/src/routes/generate/generate-route-utils.ts:464.maximumtoxhighfor supported models, elsehigh, atmain:packages/server/src/routes/generate/dry-run-route.ts:1427.reasoningEffort?: "low" | "medium" | "high" | "xhigh"atmain:packages/server/src/services/llm/base-provider.ts:96.reasoningEffort: "low" | "medium" | "high" | "xhigh" | "maximum"and other advanced fields atsrc/engine/contracts/schemas/prompt.schema.ts:37.src/engine/generation/prompt-assembly.ts:2853andsrc/engine/generation/context.ts:89.src/engine/generation/start-generation.ts:3301."maximum"and"xhigh"to"high"atsrc-tauri/crates/llm/src/lib.rs:368.Files inspected:
src/engine/contracts/schemas/prompt.schema.tssrc/engine/contracts/types/prompt.tssrc/engine/generation/generate-route-utils.tssrc/engine/generation/prompt-assembly.tssrc/engine/generation/context.tssrc/engine/generation/start-generation.tssrc-tauri/crates/llm/src/lib.rsmain:packages/shared/src/schemas/prompt.schema.tsmain:packages/server/src/routes/generate/generate-route-utils.tsmain:packages/server/src/routes/generate/dry-run-route.tsmain:packages/server/src/services/llm/base-provider.tsmain:packages/server/src/services/llm/providers/openai.provider.tsmain:packages/server/src/services/llm/providers/google.provider.tsRegression notes
Legacy
mainpreserves or resolves advanced reasoning effort toxhighfor supported models. Refactorsrc-tauri/crates/llm/src/lib.rscollapsesxhighandmaximumtohighin the OpenAI/OpenRouter reasoning helper.Additional context
Acceptance criteria:
08-PRESET-CONTRACT-advanced-generation-paramspreservesxhighreasoning effort in the refactor provider contract for eligible providers/models.reasoningEffort: "maximum"resolves to the highest supported effort level using provider/model-aware logic equivalent to legacy behavior.xhigh, fallback-to-high, and unchanged non-reasoning parameter mappings.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@Xelvanis commented on GitHub (Jun 5, 2026):
Claiming this. I’ll work the Rust LLM provider normalization path and validate with focused provider-body coverage plus cargo check.