Skip to content

Commit 339f7c6

Browse files
WebMadrrewll
authored andcommitted
refactor(core): use canonical provider identifiers (Zoo-Code-Org#1022)
* refactor(core): use canonical provider identifiers * test(core): tighten canonical provider coverage * test(core): avoid mutating provider identifiers * test(core): address canonical identifier review feedback * chore(lint): update test suppression counts * test(core): keep existing non-null assertions
1 parent 61eeb49 commit 339f7c6

7 files changed

Lines changed: 226 additions & 97 deletions

File tree

src/core/task/Task.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import {
5454
ConsecutiveMistakeError,
5555
MAX_MCP_TOOLS_THRESHOLD,
5656
countEnabledMcpTools,
57+
providerIdentifiers,
5758
} from "@roo-code/types"
5859
import { TelemetryService } from "@roo-code/telemetry"
5960
import { CloudService } from "@roo-code/cloud"
@@ -4224,7 +4225,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
42244225
// but uses allowedFunctionNames to restrict which tools can be called.
42254226
// Other providers (Anthropic, OpenAI, etc.) don't support this feature yet,
42264227
// so they continue to receive only the filtered tools for the current mode.
4227-
const supportsAllowedFunctionNames = apiConfiguration?.apiProvider === "gemini"
4228+
const supportsAllowedFunctionNames = apiConfiguration?.apiProvider === providerIdentifiers.gemini
42284229

42294230
{
42304231
const provider = this.providerRef.deref()

0 commit comments

Comments
 (0)