add output length errors

This commit is contained in:
Dax Raad
2025-06-25 11:02:09 -04:00
committed by Jay V
parent 3d02e07161
commit dcd3131f58
2 changed files with 24 additions and 0 deletions
+6
View File
@@ -4,6 +4,11 @@ import { Provider } from "../provider/provider"
import { NamedError } from "../util/error"
export namespace Message {
export const OutputLengthError = NamedError.create(
"SessionOutputLengthError",
z.object({}),
)
export const ToolCall = z
.object({
state: z.literal("call"),
@@ -145,6 +150,7 @@ export namespace Message {
.discriminatedUnion("name", [
Provider.AuthError.Schema,
NamedError.Unknown.Schema,
OutputLengthError.Schema,
])
.optional(),
sessionID: z.string(),