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
add configurable reasoning preservation for openai completions
Standard behavior: discard reasoning before last user message (based on OpenAI SDK).
Model-level config enables preservation (e.g. GLM-4.7 with preserved thinking).
Changes:
- prune-history: add keep-history-reasoning parameter
- Tests: cover both pruning and preservation
- Docs: add keepHistoryReasoning to model schema
|`api`| string | The API schema to use (`"openai-responses"`, `"openai-chat"`, or `"anthropic"`) | Yes |
67
-
|`url`| string | API URL (with support for env like `${env:MY_URL}`) | No*|
68
-
|`key`| string | API key (with support for `${env:MY_KEY}` or `{netrc:api.my-provider.com}`| No*|
69
-
|`completionUrlRelativePath`| string | Optional override for the completion endpoint path (see defaults below and examples like Azure) | No |
70
-
|`thinkTagStart`| string | Optional override the think start tag tag for openai-chat (Default: "<think>") api | No |
71
-
|`thinkTagEnd`| string | Optional override the think end tag for openai-chat (Default: "</think>") api | No |
72
-
|`httpClient`| map | Allow customize the http-client for this provider requests, like changing http version | No |
73
-
|`models`| map | Key: model name, value: its config | Yes |
74
-
|`models <model> extraPayload`| map | Extra payload sent in body to LLM | No |
75
-
|`models <model> modelName`| string | Override model name, useful to have multiple models with different configs and names that use same LLM model | No |
76
-
|`fetchModels`| boolean | Enable automatic model discovery from `/models` endpoint (OpenAI-compatible providers) | No |
|`api`| string | The API schema to use (`"openai-responses"`, `"openai-chat"`, or `"anthropic"`) | Yes |
67
+
|`url`| string | API URL (with support for env like `${env:MY_URL}`) | No*|
68
+
|`key`| string | API key (with support for `${env:MY_KEY}` or `{netrc:api.my-provider.com}`| No*|
69
+
|`completionUrlRelativePath`| string | Optional override for the completion endpoint path (see defaults below and examples like Azure) | No |
70
+
|`thinkTagStart`| string | Optional override the think start tag tag for openai-chat (Default: "<think>") api | No |
71
+
|`thinkTagEnd`| string | Optional override the think end tag for openai-chat (Default: "</think>") api | No |
72
+
|`httpClient`| map | Allow customize the http-client for this provider requests, like changing http version | No |
73
+
|`models`| map | Key: model name, value: its config | Yes |
74
+
|`models <model> extraPayload`| map | Extra payload sent in body to LLM | No |
75
+
|`models <model> modelName`| string | Override model name, useful to have multiple models with different configs and names that use same LLM model | No |
76
+
|`models <model> keepHistoryReasoning`| boolean | Keep `reason` messages in conversation history. Default: `false`| No |
77
+
|`fetchModels`| boolean | Enable automatic model discovery from `/models` endpoint (OpenAI-compatible providers) | No |
77
78
78
79
_* url and key will be searched as envs `<provider>_API_URL` and `<provider>_API_KEY`, they require the env to be found or config to work._
79
80
@@ -120,6 +121,30 @@ Examples:
120
121
121
122
This way both will use gpt-5 model but one will override the reasoning to be high instead of the default.
122
123
124
+
=== "History reasoning"
125
+
126
+
`keepHistoryReasoning` preserves reasoning in conversation history. Set for specific models:
0 commit comments