feat(thinkingControl): implement thinking mode configuration in model editor
- Added a new thinking mode control field in the ModelEditorDialog, allowing users to specify how the agent's thinking mode is formatted for API requests. - Introduced localization strings for thinking mode labels and descriptions in English, Korean, Russian, and Chinese, enhancing user experience across multiple languages. - Updated the model form data structure to include thinking control settings, ensuring proper handling during model edits and saves. - Implemented utility functions for resolving and defaulting thinking control values based on provider and model, improving backend integration. - Added tests for the new thinking control functionality to ensure reliability and correctness in handling user configurations.
This commit is contained in:
@@ -178,7 +178,7 @@ func TestBuildChatCompletionRequest_GPT5MaxCompletionTokens(t *testing.T) {
|
||||
FrequencyPenalty: 0.1,
|
||||
PresencePenalty: 0.2,
|
||||
}
|
||||
req := c.BuildChatCompletionRequest(messages, opts, false)
|
||||
req := c.shapedRequest(messages, opts, false)
|
||||
|
||||
if tc.shouldRewriteMaxT {
|
||||
assert.Equal(t, 0, req.MaxTokens, "MaxTokens must NOT be sent for GPT-5/o-series")
|
||||
@@ -201,7 +201,7 @@ func TestBuildChatCompletionRequest_GPT5MaxCompletionTokens(t *testing.T) {
|
||||
MaxTokens: 128,
|
||||
MaxCompletionTokens: 2048,
|
||||
}
|
||||
req := c.BuildChatCompletionRequest(messages, opts, false)
|
||||
req := c.shapedRequest(messages, opts, false)
|
||||
assert.Equal(t, 0, req.MaxTokens)
|
||||
assert.Equal(t, 2048, req.MaxCompletionTokens)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user