Repository navigation
feat(providers): extra request body per Provider for Profile Chains - #157
Merged
Merged
Conversation
A Provider can now carry an extra_body: a JSON object merged into every chat
request a Profile Chain sends it, the picker's counterpart of
TRADER_DECIDE_EXTRA_BODY. OpenRouter's nemotron-3-super reasons by default
and returns empty content at decide's 512 max_tokens; with
{"reasoning":{"enabled":false}} it answers.
- migration 0020: llm_providers.extra_body jsonb NOT NULL DEFAULT '{}'
- ProviderDesk.set_extra_body: JSON object (or its text, loads_extra_body
semantics), {} clears, audited as set_provider_extra_body; refuses
chat_template_kwargs unless the base URL is the Nemotron preset endpoint,
and refuses fields on Anthropic/Jev Providers, which would never send them
- list/_out shows extra_body
- one service capability, wired to API (POST /providers/{name}/extra-body),
MCP (generated) and CLI (trader provider set-extra-body)
- ProfileDesk: vendor clients send the Provider's body; the preset endpoint
gets apply_thinking_guard(body); chat_template_kwargs is dropped at build
if the preset URL has since moved. updated_at invalidates cached clients,
as a key change does
- on_preset_endpoint moved to llm.nemotron and shared by both desks
- desk: Extra body editor on OpenAI-chat Provider rows, route allowlisted
Claude-Session: https://claude.ai/code/session_01UDNLNu854ULHbHSL59UJKu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Provider in the model picker can now carry extra request fields (a JSON object), set on every surface: service, API (
POST /providers/{name}/extra-body), MCP (set_provider_extra_body), CLI (trader provider set-extra-body), and the desk.Why: OpenRouter's
nvidia/nemotron-3-super-120b-a12breasons by default and returns empty content at decide's 512 max_tokens. The.envchain could already send{"reasoning":{"enabled":false}}viaTRADER_DECIDE_EXTRA_BODY, but a Profile Chain's vendor Provider could not.0020addsproviders.extra_body(jsonb, default{}); every save is audited.chat_template_kwargsis refused on any Provider that is not the Nemotron preset endpoint, and dropped at client build if the preset URL later moves.updated_at, already part of the client cache key, so the next call uses it.https://claude.ai/code/session_01UDNLNu854ULHbHSL59UJKu