From b5bbf0e17e240c1025478dea1cea3a8236940595 Mon Sep 17 00:00:00 2001 From: fishaudio-bot <242899544+fishaudio-bot@users.noreply.github.com> Date: Sun, 25 Oct 2026 17:51:58 +0000 Subject: [PATCH] chore: update OpenAPI schema --- api-reference/openapi.json | 172 +++++++++++++++++++++++++++++++++---- 1 file changed, 153 insertions(+), 19 deletions(-) diff --git a/api-reference/openapi.json b/api-reference/openapi.json index eb47d25..b5d1bb7 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -3828,6 +3828,9 @@ "guardrails": { "$ref": "#/components/schemas/AgentGuardrailsConfig" }, + "context": { + "$ref": "#/components/schemas/AgentContextConfig" + }, "llm": { "$ref": "#/components/schemas/AgentLLMConfigRedacted" }, @@ -3852,6 +3855,7 @@ "knowledge_base", "analysis", "guardrails", + "context", "llm", "updated_at" ], @@ -4051,6 +4055,9 @@ "guardrails": { "$ref": "#/components/schemas/AgentGuardrailsConfig" }, + "context": { + "$ref": "#/components/schemas/AgentContextConfig" + }, "llm": { "$ref": "#/components/schemas/AgentLLMConfigRedacted" }, @@ -4075,6 +4082,7 @@ "knowledge_base", "analysis", "guardrails", + "context", "llm", "updated_at" ], @@ -18657,6 +18665,27 @@ "title": "AgentSessionAsrOverridesPayload", "type": "object" }, + "AgentSessionContextPayload": { + "additionalProperties": false, + "description": "Per-session overrides of the agent's context switches (the config's\n`context` section). A switch left out follows the agent.", + "properties": { + "current_time": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Whether the agent knows the current date and time in this session. Omit it to follow the agent's `context.current_time`. `false` withholds both from this session, `true` injects them even when the agent has them off.", + "title": "Current Time" + } + }, + "title": "AgentSessionContextPayload", + "type": "object" + }, "AgentSessionCreatePayload": { "additionalProperties": false, "properties": { @@ -18705,10 +18734,17 @@ "description": "The end user's device timezone as an IANA name (like `Asia/Tokyo`), used as a fallback hint: it applies only when neither `timezone` nor the agent's configured timezone is set, and invalid values are ignored rather than rejected. The Web SDK fills it automatically from the browser for public agents. When your backend creates the session, forward the value from your client.", "title": "Client Timezone" }, - "world_context": { - "default": true, - "title": "World Context", - "type": "boolean" + "context": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentSessionContextPayload" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Per-session overrides of the agent's context switches (`context.current_time` in the agent config). A switch you leave out follows the agent." }, "overrides": { "anyOf": [ @@ -20918,6 +20954,17 @@ ], "default": null }, + "context": { + "anyOf": [ + { + "$ref": "#/components/schemas/PublicAgentContextPatch" + }, + { + "type": "null" + } + ], + "default": null + }, "llm": { "anyOf": [ { @@ -20945,6 +20992,25 @@ "title": "PublicAgentConfigPatchPayload", "type": "object" }, + "PublicAgentContextPatch": { + "additionalProperties": false, + "properties": { + "current_time": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Current Time" + } + }, + "title": "PublicAgentContextPatch", + "type": "object" + }, "PublicAgentConversationPatch": { "additionalProperties": false, "properties": { @@ -21090,17 +21156,36 @@ "default": null, "title": "Hangup After Seconds" }, - "hangup_farewell_enabled": { + "hangup_farewell_mode": { "anyOf": [ { - "type": "boolean" + "enum": [ + "generated", + "fixed", + "off" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "What the agent says before a silence hangup. `off` (default) hangs up without a word, `generated` says a short goodbye, `fixed` says hangup_farewell_message. A `fixed` mode with an empty message falls back to `generated`. If the caller speaks during the goodbye, the call goes on.", + "title": "Hangup Farewell Mode" + }, + "hangup_farewell_message": { + "anyOf": [ + { + "type": "string" }, { "type": "null" } ], "default": null, - "title": "Hangup Farewell Enabled" + "description": "The goodbye said verbatim in the `fixed` hangup_farewell_mode, at most 500 characters. `{{variable}}` placeholders are filled in for each session. \"\" clears it.", + "title": "Hangup Farewell Message" }, "record_audio": { "anyOf": [ @@ -21347,7 +21432,7 @@ } ], "default": null, - "description": "Extra headers sent on every request to your endpoint, such as `x-vercel-protection-bypass`; write-only, reads return null. Omit to keep the stored headers, `{}` clears them.", + "description": "Extra headers sent on every request to your endpoint, such as `x-vercel-protection-bypass`. Reads return the stored map. Omit to keep the stored headers, `{}` clears them.", "title": "Headers" } }, @@ -22155,6 +22240,18 @@ "title": "AgentAnalysisSummaryConfig", "type": "object" }, + "AgentContextConfig": { + "description": "Facts the platform tells the agent on its own, one switch per fact.\nThe same mechanism as a guardrail with the opposite sign: a guardrail is\na prompt addition that constrains, a context switch is one that informs.", + "properties": { + "current_time": { + "default": true, + "title": "Current Time", + "type": "boolean" + } + }, + "title": "AgentContextConfig", + "type": "object" + }, "AgentConversationConfig": { "properties": { "max_duration_seconds": { @@ -22227,10 +22324,22 @@ "title": "Hangup After Seconds", "type": "integer" }, - "hangup_farewell_enabled": { - "default": false, - "title": "Hangup Farewell Enabled", - "type": "boolean" + "hangup_farewell_mode": { + "default": "off", + "description": "What the agent says before a silence hangup. `off` (default) hangs up without a word, `generated` says a short goodbye, `fixed` says hangup_farewell_message. A `fixed` mode with an empty message falls back to `generated`. If the caller speaks during the goodbye, the call goes on.", + "enum": [ + "generated", + "fixed", + "off" + ], + "title": "Hangup Farewell Mode", + "type": "string" + }, + "hangup_farewell_message": { + "default": "", + "description": "The goodbye said verbatim in the `fixed` hangup_farewell_mode, at most 500 characters. `{{variable}}` placeholders are filled in for each session. \"\" clears it.", + "title": "Hangup Farewell Message", + "type": "string" }, "record_audio": { "default": true, @@ -22489,7 +22598,7 @@ "type": "object" }, "AgentLLMCustomConfigRedacted": { - "description": "Read entity: the stored api_key and headers never leave the collection.", + "description": "Read entity: the stored api_key never leaves the collection. The headers\nread back as stored, like the non-credential headers of a webhook tool.", "properties": { "base_url": { "minLength": 1, @@ -22507,9 +22616,19 @@ "type": "null" }, "headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], "default": null, - "title": "Headers", - "type": "null" + "title": "Headers" } }, "required": [ @@ -23118,6 +23237,9 @@ "guardrails": { "$ref": "#/components/schemas/AgentGuardrailsConfig" }, + "context": { + "$ref": "#/components/schemas/AgentContextConfig" + }, "llm": { "$ref": "#/components/schemas/AgentLLMConfigRedacted" }, @@ -23142,6 +23264,7 @@ "knowledge_base", "analysis", "guardrails", + "context", "llm", "updated_at" ], @@ -24912,10 +25035,8 @@ "default": null, "title": "Channel" }, - "world_context": { - "default": false, - "title": "World Context", - "type": "boolean" + "context": { + "$ref": "#/components/schemas/AgentTestSimulationContext" } }, "required": [ @@ -24925,6 +25046,19 @@ "title": "AgentTestSimulationConfig", "type": "object" }, + "AgentTestSimulationContext": { + "additionalProperties": false, + "description": "The run's platform context switches, the agent config's `context`\nsection for a test. Off so a date pinned in the prompt holds.", + "properties": { + "current_time": { + "default": false, + "title": "Current Time", + "type": "boolean" + } + }, + "title": "AgentTestSimulationContext", + "type": "object" + }, "AgentTestSuccessCondition": { "additionalProperties": false, "description": "One natural-language criterion the judge scores on the whole conversation.",