Round 3 of 3-Opus parallel review (2 reviewers HIGH on the persistence
chain, 2 HIGH on the routing chain, 1 HIGH on the test coverage gap).
HIGH fixes:
1. chat-runtime-store.ts: PERSISTED_INFERENCE_PARAM_KEYS extended from
16 to 44 keys (28 extended samplers added). Before this, any value
set on the Advanced Sampling sliders was lost on page reload because
getChangedInferenceParams / getHydratedSettingsState iterate this
list.
2. routes/chat_history.py: ChatInferenceSettings (extra="forbid")
extended to mirror InferenceParams including fastMode + 28 new
samplers. Without this every settings PUT containing any of those
fields would 422.
3. routes/inference.py _build_openai_passthrough_body: was forwarding
typical_p / mirostat / dynatemp but silently dropping dry_*, xtc_*,
min_keep, ignore_eos, min_tokens, vLLM output knobs (skip/spaces
special-tokens, include_stop_str_in_output, truncate_prompt_tokens),
and llama.cpp instrumentation flags (n_keep, n_probs, cache_prompt,
return_tokens, timings_per_token, post_sampling_probs). Now forwards
all 18 to _build_passthrough_payload.
4. routes/inference.py _proxy_to_external_provider + external_provider.py
stream_chat_completion: 20 extended kwargs are now plumbed through
the route -> client -> OAI-compat body builder. Before this fix the
chat-adapter computed top_a / vLLM output knobs / llama.cpp samplers
on the frontend, sent them on the wire, and the route layer dropped
them on the floor.
5. test_sampling_params_routing.py: extended
test_chat_settings_payload_accepts_new_sampling_keys to round-trip
every persisted field (was only 5). Added
test_openrouter_forwards_top_a and test_vllm_forwards_output_shape_knobs
to lock in the new wire forwarding.
MEDIUM fixes:
- providers.py: Mistral stop_max=4 (matches third-party shims; OAI docs
publish no max but every consumer caps at 4).
- providers.py: Kimi body_omit now includes "presence_penalty" (Kimi
k2.5/k2.6 chat schema lists temperature/top_p/max_tokens/stream/tools/
tool_choice/thinking but not presence_penalty).
- external_provider.py: body_omit loop also pops the seed_field
rename so a future provider with both `seed_field="random_seed"` and
`body_omit=("seed",)` strips correctly. No current provider has both;
defensive only.
- chat-adapter.ts: local-path parallel_tool_calls forwards only on
explicit opt-out (matches the external-path stanza). Before this the
field was sent on every chat from every existing local user.
- chat-settings-sheet.tsx: service tier Select now clamps the displayed
value to a legal option for the active provider (e.g. "priority"
saved on OpenAI, then user switches to Anthropic which only allows
auto/standard_only -> Radix Select was showing a blank trigger).
LOW fixes:
- Em-dash cleanup: 7 em-dashes removed from provider-capabilities.ts /
runtime.ts / chat-settings-sheet.tsx / test_sampling_params_routing.py
per project rules.
Tests: 397/397 backend pass (sampling routing 69 plus anthropic /
openai / gemini / llama-server suites). Frontend tsc + vite build clean.