[GH-ISSUE #1291] [Issue]: Agents ignore their connection's generation parameters (assistant prefill, reasoning effort, samplers) — only temperature and max tokens are used #636

Closed
opened 2026-10-20 17:31:06 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @GetBeholder on GitHub (May 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1291

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Agents do not use the generation parameters configured on their connection.
Beyond temperature (where a lower value is often desirable for agents anyway),
agents also ignore assistant prefill, reasoning level/effort, and other sampler
parameters. Setting up a dedicated connection profile with those parameters — the
workaround a maintainer recommended — does not work, because the connection's
parameters are not applied to agent requests. This affects both manually added
agents and hidden / behind-the-scenes agents (e.g. the selfie prompt generator
and the scheduling agent).

Expected behavior

When an agent uses a connection (especially a dedicated connection profile), the
connection's configured generation parameters — assistant prefill, reasoning
effort, samplers (topP/topK/minP/etc.), and custom parameters — should be applied
to the agent's request, the same way they are for normal chat/RP generation. Per
maintainer guidance, creating a dedicated connection profile with these
parameters should let agents use them.

Actual behavior

Only temperature and max tokens reach the agent's LLM request. Assistant prefill,
reasoning effort, and other connection-level parameters are dropped, so a
"no thinking" connection profile (assistant prefill that disables Gemma's
thinking) has no effect when used by an agent.

Steps to reproduce

  1. Create a dedicated connection profile (e.g. on KoboldCPP) with an assistant
    prefill configured (e.g. the Google-recommended Gemma prefill that disables
    thinking) and/or a reasoning level.
  2. Assign that connection to an agent (or rely on it for hidden agents).
  3. Run a turn that triggers the agent.
  4. Observe the agent's output ignores the assistant prefill / reasoning settings
    (thinking is not disabled) — the connection's parameters are not applied.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: Release v1.6.1 / Build 77a30fa (GitHub clone)
  • Run mode: accessed via Firefox; run mode unconfirmed (web shell or self-hosted)
  • OS + version: Windows 11
  • Node + pnpm versions: not provided
  • Rust version, if relevant: not provided
  • Remote Runtime URL configured? not specified
  • Provider, model, or integration, if relevant: KoboldCPP (local), Gemma

Logs, screenshots, or video

None provided.

Regression notes

Not provided.

Additional context

Source: forum report by Kat (2-Star), 5/24/26 7:51 PM. Kat originally filed this
as a feature request and was advised that the proper way to customize agent
assistant prefill etc. is to create a dedicated connection profile; after doing
so, the connection's parameters still are not used — hence this bug report. Use
case: a single KoboldCPP connection where assistant prefill toggles Gemma thinking
on/off without reloading the backend, to get faster agent replies without lowering
chat/RP quality. The reporter notes this would still apply even on backends that
support reasoning-level flags.

Triage pointer (from a scan, not from the reporter): the agent LLM request is
built in src/engine/generation/agent-runner.ts (llmProvider → llm.stream),
which forwards only parameters: { temperature, maxTokens } (~L79-82) and does
not read the connection's stored generation parameters. By contrast, the normal
generation path uses parseStoredGenerationParameters in
src/engine/generation/generate-route-utils.ts (~L287-332), which extracts
temperature, topP/topK/minP, reasoningEffort, verbosity,
assistantPrefill, and customParameters from the connection/chat. Applying that
same parameter set (especially assistantPrefill and reasoningEffort) in the
agent path would address this. Because all agents route through agent-runner.ts,
this affects manual and hidden agents alike.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @GetBeholder on GitHub (May 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1291 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Agents do not use the generation parameters configured on their connection. Beyond temperature (where a lower value is often desirable for agents anyway), agents also ignore assistant prefill, reasoning level/effort, and other sampler parameters. Setting up a dedicated connection profile with those parameters — the workaround a maintainer recommended — does not work, because the connection's parameters are not applied to agent requests. This affects both manually added agents and hidden / behind-the-scenes agents (e.g. the selfie prompt generator and the scheduling agent). ## Expected behavior When an agent uses a connection (especially a dedicated connection profile), the connection's configured generation parameters — assistant prefill, reasoning effort, samplers (topP/topK/minP/etc.), and custom parameters — should be applied to the agent's request, the same way they are for normal chat/RP generation. Per maintainer guidance, creating a dedicated connection profile with these parameters should let agents use them. ## Actual behavior Only temperature and max tokens reach the agent's LLM request. Assistant prefill, reasoning effort, and other connection-level parameters are dropped, so a "no thinking" connection profile (assistant prefill that disables Gemma's thinking) has no effect when used by an agent. ## Steps to reproduce 1. Create a dedicated connection profile (e.g. on KoboldCPP) with an assistant prefill configured (e.g. the Google-recommended Gemma prefill that disables thinking) and/or a reasoning level. 2. Assign that connection to an agent (or rely on it for hidden agents). 3. Run a turn that triggers the agent. 4. Observe the agent's output ignores the assistant prefill / reasoning settings (thinking is not disabled) — the connection's parameters are not applied. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [x] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: Release v1.6.1 / Build 77a30fa (GitHub clone) - Run mode: accessed via Firefox; run mode unconfirmed (web shell or self-hosted) - OS + version: Windows 11 - Node + pnpm versions: not provided - Rust version, if relevant: not provided - Remote Runtime URL configured? not specified - Provider, model, or integration, if relevant: KoboldCPP (local), Gemma ## Logs, screenshots, or video None provided. ## Regression notes Not provided. ## Additional context Source: forum report by Kat (2-Star), 5/24/26 7:51 PM. Kat originally filed this as a feature request and was advised that the proper way to customize agent assistant prefill etc. is to create a dedicated connection profile; after doing so, the connection's parameters still are not used — hence this bug report. Use case: a single KoboldCPP connection where assistant prefill toggles Gemma thinking on/off without reloading the backend, to get faster agent replies without lowering chat/RP quality. The reporter notes this would still apply even on backends that support reasoning-level flags. Triage pointer (from a scan, not from the reporter): the agent LLM request is built in `src/engine/generation/agent-runner.ts` (`llmProvider` → `llm.stream`), which forwards only `parameters: { temperature, maxTokens }` (~L79-82) and does not read the connection's stored generation parameters. By contrast, the normal generation path uses `parseStoredGenerationParameters` in `src/engine/generation/generate-route-utils.ts` (~L287-332), which extracts `temperature`, `topP`/`topK`/`minP`, `reasoningEffort`, `verbosity`, `assistantPrefill`, and `customParameters` from the connection/chat. Applying that same parameter set (especially `assistantPrefill` and `reasoningEffort`) in the agent path would address this. Because all agents route through `agent-runner.ts`, this affects manual and hidden agents alike. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:31:06 +07:00
  • closed this issue
  • added the
    shared
    bug
    labels
Author
Owner

@SpicyMarinara commented on GitHub (May 27, 2026):

Fixed on refactor in 8058f66dd4: agent LLM calls now merge the selected connection generation parameters, including sampler/reasoning/prefill values, while still allowing agent temperature/token overrides. Added focused Vitest coverage and ran pnpm check.

<!-- gh-comment-id:4555719122 --> @SpicyMarinara commented on GitHub (May 27, 2026): Fixed on refactor in 8058f66dd4affb1e74e4bdbce3b7d4580554fb9b: agent LLM calls now merge the selected connection generation parameters, including sampler/reasoning/prefill values, while still allowing agent temperature/token overrides. Added focused Vitest coverage and ran pnpm check.
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#636
No description provided.