add output length errors

This commit is contained in:
Dax Raad
2025-06-25 11:02:09 -04:00
parent 4e7f6c47fd
commit 77ae3fb9b9
2 changed files with 24 additions and 0 deletions

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(),