fix(protocol): keep agent provider string

This commit is contained in:
Peter Steinberger
2026-01-09 23:09:07 +01:00
parent 3f1415b8fe
commit 2af3853bfa
2 changed files with 21 additions and 6 deletions

View File

@@ -1,6 +1,5 @@
import { type Static, type TSchema, Type } from "@sinclair/typebox";
import { SESSION_LABEL_MAX_LENGTH } from "../../sessions/session-label.js";
import { GATEWAY_AGENT_PROVIDER_VALUES } from "../../utils/message-provider.js";
const NonEmptyString = Type.String({ minLength: 1 });
const SessionLabelString = Type.String({
@@ -8,10 +7,6 @@ const SessionLabelString = Type.String({
maxLength: SESSION_LABEL_MAX_LENGTH,
});
const AgentProviderSchema = Type.Union(
GATEWAY_AGENT_PROVIDER_VALUES.map((provider) => Type.Literal(provider)),
);
export const PresenceEntrySchema = Type.Object(
{
host: Type.Optional(NonEmptyString),
@@ -230,7 +225,7 @@ export const AgentParamsSchema = Type.Object(
sessionKey: Type.Optional(Type.String()),
thinking: Type.Optional(Type.String()),
deliver: Type.Optional(Type.Boolean()),
provider: Type.Optional(AgentProviderSchema),
provider: Type.Optional(Type.String()),
timeout: Type.Optional(Type.Integer({ minimum: 0 })),
lane: Type.Optional(Type.String()),
extraSystemPrompt: Type.Optional(Type.String()),