feat(agents): add isGeminiModel detection function with TDD
Detects Gemini models via: - Provider prefixes: google/, google-vertex/ - GitHub Copilot: github-copilot/gemini-* - Model name: gemini-* (for proxied providers like litellm) Follows existing isGptModel pattern. All 16 tests pass.
This commit is contained in:
@@ -80,6 +80,19 @@ export function isGptModel(model: string): boolean {
|
||||
return GPT_MODEL_PREFIXES.some((prefix) => modelName.startsWith(prefix))
|
||||
}
|
||||
|
||||
const GEMINI_PROVIDERS = ["google/", "google-vertex/"]
|
||||
|
||||
export function isGeminiModel(model: string): boolean {
|
||||
if (GEMINI_PROVIDERS.some((prefix) => model.startsWith(prefix)))
|
||||
return true
|
||||
|
||||
if (model.startsWith("github-copilot/") && extractModelName(model).toLowerCase().startsWith("gemini"))
|
||||
return true
|
||||
|
||||
const modelName = extractModelName(model).toLowerCase()
|
||||
return modelName.startsWith("gemini-")
|
||||
}
|
||||
|
||||
export type BuiltinAgentName =
|
||||
| "sisyphus"
|
||||
| "hephaestus"
|
||||
|
||||
Reference in New Issue
Block a user