Add Vertex AI routing support (#753)
* add Vertex AI routing support * include Vertex smokes in action CI
This commit is contained in:
committed by
pullfrog[bot]
parent
09344a9ec9
commit
c43ed65c3b
@@ -57,6 +57,7 @@ import {
|
||||
} from "../utils/subprocess.ts";
|
||||
import type { TodoTracker } from "../utils/todoTracking.ts";
|
||||
import { getDevDependencyVersion } from "../utils/version.ts";
|
||||
import { resolveVertexOpenCodeModel } from "../utils/vertex.ts";
|
||||
import {
|
||||
PULLFROG_BUS_EVENT_TYPE,
|
||||
PULLFROG_OPENCODE_PLUGIN_FILENAME,
|
||||
@@ -906,7 +907,8 @@ export const opencode = agent({
|
||||
const bedrockModelId = process.env[BEDROCK_MODEL_ID_ENV]?.trim();
|
||||
const isBedrockRoute =
|
||||
rawModel !== undefined && bedrockModelId !== undefined && bedrockModelId === rawModel;
|
||||
const model = isBedrockRoute ? `amazon-bedrock/${rawModel}` : rawModel;
|
||||
const vertexModel = resolveVertexOpenCodeModel(rawModel);
|
||||
const model = vertexModel ?? (isBedrockRoute ? `amazon-bedrock/${rawModel}` : rawModel);
|
||||
|
||||
const homeEnv = {
|
||||
HOME: ctx.tmpdir,
|
||||
|
||||
Reference in New Issue
Block a user