Make provider sampler params opt-in; drop escalation preset
Sampler parameters (temperature/top_p/presence_penalty/frequency_penalty) now default to None and are omitted from the request payload when unset, so the server's model/Modelfile default applies. The provider no longer guesses values on the user's behalf; callers opt in via config or a per-chat override. - provider.OpenAICompatClient / llm.LLMClient: default the four params to None and only include them in the payload when set (max_tokens/reasoning_effort already behaved this way). - cli.build_scheduler: pass None when the config key is absent via _opt_float, instead of hardcoded numeric fallbacks. - codegen: remove ESCALATED_SAMPLER and its use on retries (body, elicitation, testgen, regen). The retry ladder keeps the fresh short prompt but reuses the configured/omitted sampler; appropriate values can't be known in advance for arbitrary user models. - console: no functional change; the hosted Console API now receives no sampler params by default. - Tests cover omit-by-default, send-when-configured, per-call override, and the no-escalation retry. - Docs: config.example.json comments, provider/llm/codegen/console docstrings, AGENTS.md.
This commit is contained in:
1 parent
8afb488dc4
commit
5747ad2fa6
11 files changed
+223
-105
No files matched your search
@@ -47,7 +47,8 @@ class OpenCodeConsoleClient(OpenAICompatClient):
|
||||
Pins the Console defaults: bearer auth, the Console base URL, a Console
|
||||
label, and ``query_context = False`` (no ollama ``/api/show`` probe). The
|
||||
endpoint subclasses below reuse it via cooperative multiple inheritance so
|
||||
they also keep ``LLMClient``/``CodegenClient`` sampler defaults.
|
||||
they also keep ``LLMClient``/``CodegenClient`` sampler parameters (opt-in:
|
||||
none are sent unless configured).
|
||||
|
||||
A default ``User-Agent`` is always sent: the Console gateway rejects
|
||||
urllib's default ``Python-urllib/<ver>`` with HTTP 403. Pass ``user_agent``
|
||||
@@ -91,9 +92,9 @@ class OpenCodeConsoleClient(OpenAICompatClient):
|
||||
class ConsoleLLMClient(OpenCodeConsoleClient, LLMClient):
|
||||
"""Console-backed `llm` author (skill/category title + description).
|
||||
|
||||
Same conservative sampler defaults as ``LLMClient``; the Console transport
|
||||
adds the bearer key and skips the ollama probe. Raises ``LLMError``
|
||||
(unchanged contract).
|
||||
Same opt-in sampler behavior as ``LLMClient`` (none sent unless configured);
|
||||
the Console transport adds the bearer key and skips the ollama probe. Raises
|
||||
``LLMError`` (unchanged contract).
|
||||
|
||||
``disable_thinking`` is forced **off**: `LLMClient` sends
|
||||
``reasoning_effort: "none"`` (an ollama-compat knob) and the Console
|
||||
|
||||
Reference in new issue
Block a user