You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(uri-params): let model-string URI beat A-leg body and extra_body
ParameterResolutionService now merges config, header, request, uri, session, and connector_forced in that rising-priority order so URI query parameters on the routed model id override duplicate top-level JSON fields and extra_body values while session and connector-forced settings still win.
Updated uri-model-parameters.md to document the full chain and reasoning_effort notes. Adjusted unit and integration tests accordingly.
Made-with: Cursor
Copy file name to clipboardExpand all lines: docs/user_guide/features/uri-model-parameters.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ This feature is particularly useful when you need to:
18
18
-**Inline Parameter Specification**: Append parameters to model strings using URI syntax (e.g., `backend:model?temperature=0.5`)
19
19
-**Multiple Parameters**: Support for multiple parameters in a single model string (e.g., `?temperature=0.5&reasoning_effort=high`)
20
20
-**Hybrid Backend Support**: Apply different parameters to reasoning and execution models independently
21
-
-**Clear Precedence**: URI parameters override config and headers but respect interactive session commands
21
+
-**Clear Precedence**: URI parameters on the model selector override A-leg JSON body fields, `extra_body`, and config; session commands and connector-forced settings can still override URI
22
22
-**Graceful Error Handling**: Invalid parameters are logged but don't break requests
23
23
24
24
## Configuration
@@ -28,24 +28,26 @@ This feature is particularly useful when you need to:
28
28
The following parameters can be specified via URI syntax:
29
29
30
30
-**temperature**: Controls randomness in model outputs (0.0-2.0)
31
-
-**reasoning_effort**: Controls computational effort for reasoning models (low/medium/high)
31
+
-**reasoning_effort**: Controls computational effort for reasoning models (`low` / `medium` / `high`; OpenAI Codex backends also support `xhigh` where the upstream API allows it)
32
32
-**top_p**: Controls diversity via nucleus sampling (e.g., 0.9)
33
33
-**top_k**: Controls diversity by filtering to the K most likely next tokens (e.g., 40)
34
34
35
35
### Parameter Precedence
36
36
37
37
Parameters are resolved from multiple sources with the following precedence (highest to lowest):
1.**Connector-forced settings** (backend `extra` / connector policy) — hard overrides from configuration
40
+
2.**Interactive session** — session reasoning mode and commands such as `!/temperature(0.5)` (and edit-precision promotions where applicable)
41
+
3.**URI parameters** — query string on the routed model id, e.g. `openai-codex:gpt-5.4-mini?reasoning_effort=xhigh`
42
+
4.**A-leg request body** — top-level OpenAI-style fields on the inbound request (for example `temperature`, `reasoning_effort`) when they were actually supplied by the client (schema defaults are not treated as overrides)
43
+
5.**`extra_body` sampling fields** — same parameter names carried in `extra_body` (lower than top-level body for resolution)
44
+
6.**Backend / app configuration** — defaults from `config.yaml` and backend blocks
43
45
44
46
When the same parameter is specified in multiple sources, the higher priority source wins. This allows you to:
45
47
46
48
- Set defaults in config files
47
-
-Override per-request with URI parameters
48
-
- Override dynamically with session commands
49
+
-Let the client send common API fields, but **prefer the model string** when you encode tuning in `backend:model?...`
50
+
- Override dynamically with session commands (or connector-forced policy when operators require it)
1. Check parameter precedence - session commands override URI parameters
283
+
1. Check parameter precedence — session and connector-forced settings override URI; URI overrides duplicate fields on the A-leg request body or in `extra_body`
282
284
2. Verify parameter name spelling (case-sensitive)
283
285
3. Enable debug logging to see parameter resolution
0 commit comments