Skip to content

Commit 782e28e

Browse files
authored
refactor(core): use canonical provider identifiers (#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 7710513 commit 782e28e

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"
@@ -4220,7 +4221,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
42204221
// but uses allowedFunctionNames to restrict which tools can be called.
42214222
// Other providers (Anthropic, OpenAI, etc.) don't support this feature yet,
42224223
// so they continue to receive only the filtered tools for the current mode.
4223-
const supportsAllowedFunctionNames = apiConfiguration?.apiProvider === "gemini"
4224+
const supportsAllowedFunctionNames = apiConfiguration?.apiProvider === providerIdentifiers.gemini
42244225

42254226
{
42264227
const provider = this.providerRef.deref()

0 commit comments

Comments
 (0)