-
Notifications
You must be signed in to change notification settings - Fork 625
feat: add web search support with configurable options for dashscope #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
11c3d53
58e81b4
a337704
04e3d87
4df25f9
1256d41
9377c48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,7 +84,10 @@ export class DataImporter { | |||||||||||||||||
| enabled_mcp_tools, | ||||||||||||||||||
| thinking_budget, | ||||||||||||||||||
| reasoning_effort, | ||||||||||||||||||
| verbosity | ||||||||||||||||||
| verbosity, | ||||||||||||||||||
| enable_search, | ||||||||||||||||||
| forced_search, | ||||||||||||||||||
| search_strategy | ||||||||||||||||||
| FROM conversations` | ||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
| ) | ||||||||||||||||||
| .all() as any[] | ||||||||||||||||||
|
|
@@ -110,7 +113,10 @@ export class DataImporter { | |||||||||||||||||
| enabled_mcp_tools: null, | ||||||||||||||||||
| thinking_budget: null, | ||||||||||||||||||
| reasoning_effort: null, | ||||||||||||||||||
| verbosity: null | ||||||||||||||||||
| verbosity: null, | ||||||||||||||||||
| enable_search: null, | ||||||||||||||||||
| forced_search: null, | ||||||||||||||||||
| search_strategy: null | ||||||||||||||||||
| })) | ||||||||||||||||||
| } catch (fallbackError) { | ||||||||||||||||||
| throw new Error( | ||||||||||||||||||
|
|
@@ -165,8 +171,9 @@ export class DataImporter { | |||||||||||||||||
| conv_id, title, created_at, updated_at, system_prompt, | ||||||||||||||||||
| temperature, context_length, max_tokens, provider_id, | ||||||||||||||||||
| model_id, is_pinned, is_new, artifacts, enabled_mcp_tools, | ||||||||||||||||||
| thinking_budget, reasoning_effort, verbosity | ||||||||||||||||||
| ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` | ||||||||||||||||||
| thinking_budget, reasoning_effort, verbosity, | ||||||||||||||||||
| enable_search, forced_search, search_strategy | ||||||||||||||||||
| ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` | ||||||||||||||||||
| ) | ||||||||||||||||||
| .run( | ||||||||||||||||||
| conv.conv_id, | ||||||||||||||||||
|
|
@@ -185,7 +192,10 @@ export class DataImporter { | |||||||||||||||||
| conv.enabled_mcp_tools || null, | ||||||||||||||||||
| conv.thinking_budget || null, | ||||||||||||||||||
| conv.reasoning_effort || null, | ||||||||||||||||||
| conv.verbosity || null | ||||||||||||||||||
| conv.verbosity || null, | ||||||||||||||||||
| conv.enable_search ?? null, | ||||||||||||||||||
| conv.forced_search ?? null, | ||||||||||||||||||
| conv.search_strategy ?? null | ||||||||||||||||||
|
Comment on lines
+195
to
+198
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: verbosity may be dropped when value is 0 due to Use nullish coalescing to preserve 0. Current code would store NULL instead of 0. Apply: - conv.verbosity || null,
+ conv.verbosity ?? null,📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| ) | ||||||||||||||||||
| } catch { | ||||||||||||||||||
| // 如果失败,使用基础字段的INSERT语句(兼容旧版本目标数据库) | ||||||||||||||||||
|
|
||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,6 +21,9 @@ type ConversationRow = { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| thinking_budget: number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reasoning_effort: string | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity: string | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enable_search: number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forced_search: number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| search_strategy: string | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // 解析 JSON 字段 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -106,12 +109,20 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ALTER TABLE conversations ADD COLUMN verbosity TEXT DEFAULT NULL; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (version === 7) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -- 添加搜索相关字段 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ALTER TABLE conversations ADD COLUMN enable_search INTEGER DEFAULT NULL; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ALTER TABLE conversations ADD COLUMN forced_search INTEGER DEFAULT NULL; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ALTER TABLE conversations ADD COLUMN search_strategy TEXT DEFAULT NULL; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| getLatestVersion(): number { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| async create(title: string, settings: Partial<CONVERSATION_SETTINGS> = {}): Promise<string> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -133,9 +144,12 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enabled_mcp_tools, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| thinking_budget, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reasoning_effort, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enable_search, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forced_search, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| search_strategy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| `) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const conv_id = nanoid() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const now = Date.now() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -156,7 +170,10 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.enabledMcpTools ? JSON.stringify(settings.enabledMcpTools) : 'NULL', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.thinkingBudget !== undefined ? settings.thinkingBudget : null, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.reasoningEffort !== undefined ? settings.reasoningEffort : null, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.verbosity !== undefined ? settings.verbosity : null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.verbosity !== undefined ? settings.verbosity : null, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.enableSearch !== undefined ? (settings.enableSearch ? 1 : 0) : null, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.forcedSearch !== undefined ? (settings.forcedSearch ? 1 : 0) : null, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| settings.searchStrategy !== undefined ? settings.searchStrategy : null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+173
to
177
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Tri-state semantics: allow reverting to NULL. Create supports NULL (inherit defaults), but update path below only writes 0/1 and cannot clear back to NULL. This breaks “use provider default” after a user toggled the setting once. Apply: - settings.enableSearch !== undefined ? (settings.enableSearch ? 1 : 0) : null,
- settings.forcedSearch !== undefined ? (settings.forcedSearch ? 1 : 0) : null,
+ settings.enableSearch !== undefined ? (settings.enableSearch ? 1 : 0) : null,
+ settings.forcedSearch !== undefined ? (settings.forcedSearch ? 1 : 0) : null,
settings.searchStrategy !== undefined ? settings.searchStrategy : nullAnd mirror the same tri-state logic in update() (see next comment) by supporting explicit NULL assignment.
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return conv_id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -182,7 +199,10 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enabled_mcp_tools, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| thinking_budget, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reasoning_effort, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enable_search, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forced_search, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| search_strategy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM conversations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WHERE conv_id = ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -213,7 +233,12 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reasoningEffort: result.reasoning_effort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? (result.reasoning_effort as 'minimal' | 'low' | 'medium' | 'high') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity: result.verbosity ? (result.verbosity as 'low' | 'medium' | 'high') : undefined | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity: result.verbosity ? (result.verbosity as 'low' | 'medium' | 'high') : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enableSearch: result.enable_search !== null ? Boolean(result.enable_search) : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forcedSearch: result.forced_search !== null ? Boolean(result.forced_search) : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| searchStrategy: result.search_strategy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? (result.search_strategy as 'turbo' | 'max') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : undefined | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -282,6 +307,18 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updates.push('verbosity = ?') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| params.push(data.settings.verbosity) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (data.settings.enableSearch !== undefined) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updates.push('enable_search = ?') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| params.push(data.settings.enableSearch ? 1 : 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (data.settings.forcedSearch !== undefined) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updates.push('forced_search = ?') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| params.push(data.settings.forcedSearch ? 1 : 0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (data.settings.searchStrategy !== undefined) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updates.push('search_strategy = ?') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| params.push(data.settings.searchStrategy) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+310
to
+321
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Update path cannot clear values back to NULL. Currently only true/false writes are possible; no way to “unset”. Support Apply: - if (data.settings.enableSearch !== undefined) {
+ if ('enableSearch' in data.settings) {
updates.push('enable_search = ?')
- params.push(data.settings.enableSearch ? 1 : 0)
+ params.push(
+ data.settings.enableSearch === null
+ ? null
+ : data.settings.enableSearch
+ ? 1
+ : 0
+ )
}
- if (data.settings.forcedSearch !== undefined) {
+ if ('forcedSearch' in data.settings) {
updates.push('forced_search = ?')
- params.push(data.settings.forcedSearch ? 1 : 0)
+ params.push(
+ data.settings.forcedSearch === null
+ ? null
+ : data.settings.forcedSearch
+ ? 1
+ : 0
+ )
}
- if (data.settings.searchStrategy !== undefined) {
+ if ('searchStrategy' in data.settings) {
updates.push('search_strategy = ?')
- params.push(data.settings.searchStrategy)
+ params.push(data.settings.searchStrategy ?? null)
}Follow-up: allow 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (updates.length > 0 || data.updatedAt) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| updates.push('updated_at = ?') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -329,7 +366,10 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enabled_mcp_tools, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| thinking_budget, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reasoning_effort, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enable_search, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forced_search, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| search_strategy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM conversations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ORDER BY updated_at DESC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LIMIT ? OFFSET ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -359,7 +399,10 @@ export class ConversationsTable extends BaseTable { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reasoningEffort: row.reasoning_effort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? (row.reasoning_effort as 'minimal' | 'low' | 'medium' | 'high') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity: row.verbosity ? (row.verbosity as 'low' | 'medium' | 'high') : undefined | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| verbosity: row.verbosity ? (row.verbosity as 'low' | 'medium' | 'high') : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| enableSearch: row.enable_search !== null ? Boolean(row.enable_search) : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forcedSearch: row.forced_search !== null ? Boolean(row.forced_search) : undefined, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| searchStrategy: row.search_strategy ? (row.search_strategy as 'turbo' | 'max') : undefined | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| })) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Avoid mutating shared modelConfig; use a per-request copy.
getModelConfig may return a shared object; in concurrent streams these mutations can leak across requests. Clone before overriding.
Also applies to: 730-738
🤖 Prompt for AI Agents