feat(id): brand ProviderID and ModelID (#17110)

This commit is contained in:
Kit Langton
2026-03-12 09:27:52 -04:00
committed by GitHub
parent 2eeba53b07
commit c45467964c
23 changed files with 157 additions and 107 deletions

View File

@@ -10,6 +10,7 @@ import { SessionRevert } from "./revert"
import { Session } from "."
import { Agent } from "../agent/agent"
import { Provider } from "../provider/provider"
import { ModelID, ProviderID } from "../provider/schema"
import { type Tool as AITool, tool, jsonSchema, type ToolCallOptions, asSchema } from "ai"
import { SessionCompaction } from "./compaction"
import { Instance } from "../project/instance"
@@ -94,8 +95,8 @@ export namespace SessionPrompt {
messageID: MessageID.zod.optional(),
model: z
.object({
providerID: z.string(),
modelID: z.string(),
providerID: ProviderID.zod,
modelID: ModelID.zod,
})
.optional(),
agent: z.string().optional(),
@@ -1471,8 +1472,8 @@ NOTE: At any point in time through this workflow you should feel free to ask the
agent: z.string(),
model: z
.object({
providerID: z.string(),
modelID: z.string(),
providerID: ProviderID.zod,
modelID: ModelID.zod,
})
.optional(),
command: z.string(),