mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
Merge pull request #10009 from Kilo-Org/refactor/narrow-openai-responses-markers
refactor(cli): narrow kilocode_change markers around Responses-API guard
This commit is contained in:
@@ -985,24 +985,27 @@ export function options(input: {
|
||||
}
|
||||
|
||||
if (input.model.api.id.includes("gpt-5") && !input.model.api.id.includes("gpt-5-chat")) {
|
||||
// kilocode_change start - guard OpenAI Responses-only params for compatible providers
|
||||
const nativeOpenAI = [
|
||||
"@ai-sdk/openai",
|
||||
"@ai-sdk/azure",
|
||||
"@ai-sdk/github-copilot",
|
||||
"@openrouter/ai-sdk-provider",
|
||||
"@kilocode/kilo-gateway",
|
||||
].includes(input.model.api.npm)
|
||||
|
||||
if (!input.model.api.id.includes("gpt-5-pro")) {
|
||||
result["reasoningEffort"] = "medium"
|
||||
if (nativeOpenAI) {
|
||||
if (
|
||||
input.model.api.npm === "@ai-sdk/openai" ||
|
||||
input.model.api.npm === "@ai-sdk/azure" ||
|
||||
input.model.api.npm === "@ai-sdk/github-copilot" || // kilocode_change
|
||||
input.model.api.npm === "@openrouter/ai-sdk-provider" || // kilocode_change
|
||||
input.model.api.npm === "@kilocode/kilo-gateway" // kilocode_change
|
||||
) {
|
||||
result["reasoningSummary"] = "auto"
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
nativeOpenAI &&
|
||||
// kilocode_change start - gate textVerbosity to Responses-API providers
|
||||
(input.model.api.npm === "@ai-sdk/openai" ||
|
||||
input.model.api.npm === "@ai-sdk/azure" ||
|
||||
input.model.api.npm === "@ai-sdk/github-copilot" ||
|
||||
input.model.api.npm === "@openrouter/ai-sdk-provider" ||
|
||||
input.model.api.npm === "@kilocode/kilo-gateway") &&
|
||||
// kilocode_change end
|
||||
input.model.api.id.includes("gpt-5.") &&
|
||||
!input.model.api.id.includes("codex") &&
|
||||
!input.model.api.id.includes("-chat") &&
|
||||
@@ -1010,7 +1013,6 @@ export function options(input: {
|
||||
) {
|
||||
result["textVerbosity"] = "low"
|
||||
}
|
||||
// kilocode_change end
|
||||
|
||||
if (input.model.providerID.startsWith("opencode")) {
|
||||
result["promptCacheKey"] = input.sessionID
|
||||
|
||||
Reference in New Issue
Block a user