mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: add openai-codex to providers that don't require API key (#10786)
Co-authored-by: Roo Code <roomote@roocode.com>
This commit is contained in:
parent
9533f0be3c
commit
c40c882561
2 changed files with 40 additions and 2 deletions
|
|
@ -59,4 +59,39 @@ describe("checkExistKey", () => {
|
|||
}
|
||||
expect(checkExistKey(config)).toBe(false)
|
||||
})
|
||||
|
||||
it("should return true for fake-ai provider without API key", () => {
|
||||
const config: ProviderSettings = {
|
||||
apiProvider: "fake-ai",
|
||||
}
|
||||
expect(checkExistKey(config)).toBe(true)
|
||||
})
|
||||
|
||||
it("should return true for claude-code provider without API key", () => {
|
||||
const config: ProviderSettings = {
|
||||
apiProvider: "claude-code",
|
||||
}
|
||||
expect(checkExistKey(config)).toBe(true)
|
||||
})
|
||||
|
||||
it("should return true for openai-codex provider without API key", () => {
|
||||
const config: ProviderSettings = {
|
||||
apiProvider: "openai-codex",
|
||||
}
|
||||
expect(checkExistKey(config)).toBe(true)
|
||||
})
|
||||
|
||||
it("should return true for qwen-code provider without API key", () => {
|
||||
const config: ProviderSettings = {
|
||||
apiProvider: "qwen-code",
|
||||
}
|
||||
expect(checkExistKey(config)).toBe(true)
|
||||
})
|
||||
|
||||
it("should return true for roo provider without API key", () => {
|
||||
const config: ProviderSettings = {
|
||||
apiProvider: "roo",
|
||||
}
|
||||
expect(checkExistKey(config)).toBe(true)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,8 +5,11 @@ export function checkExistKey(config: ProviderSettings | undefined) {
|
|||
return false
|
||||
}
|
||||
|
||||
// Special case for fake-ai, claude-code, qwen-code, and roo providers which don't need any configuration.
|
||||
if (config.apiProvider && ["fake-ai", "claude-code", "qwen-code", "roo"].includes(config.apiProvider)) {
|
||||
// Special case for fake-ai, claude-code, openai-codex, qwen-code, and roo providers which don't need any configuration.
|
||||
if (
|
||||
config.apiProvider &&
|
||||
["fake-ai", "claude-code", "openai-codex", "qwen-code", "roo"].includes(config.apiProvider)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue