Files
vocero-client/vocero-api/vocero_api/models/responses.py
T
alvaro dfed03ac7c chore(vocero): remove the legacy ApiPilot integration (#3)
Vocero now retrieves AquaPortal content through authenticated MCP. This removes the obsolete ApiPilot integration from the API and browser while preserving the separately deployed speech pipeline.

Release notes:

- Removed ApiPilot endpoints, configuration, credential overrides, and HTTP/realtime tool execution.
- Removed browser ApiPilot catalog loading and prompt generation while retaining authenticated MCP discovery.
- Updated regression coverage and operating documentation for the retired routes and settings.

Reviewed-on: AquaPortal/s2s#3
2026-10-08 11:23:41 -04:00

86 lines
2.1 KiB
Python

"""Response contracts without imposing new assumptions on upstream JSON.
Only fields constructed by this service have concrete types. Upstream-owned
values remain Any, and unknown fields remain allowed at every modeled level.
Responses are validated but serialized from their original payloads so omitted
fields, numeric representations, key order, and unknown values stay unchanged.
"""
from typing import Any, Literal
from pydantic import BaseModel, ConfigDict, RootModel
class OpenResponse(BaseModel):
model_config = ConfigDict(extra="allow", strict=True)
class ConfigResponse(OpenResponse):
mcp: bool = False
search: bool
lb: bool
allowDirect: bool
s2sUrl: str
primaryPrompt: str
reasoningType: Literal["PROXY", "OPENAI"]
injectProfile: bool
debugPrompt: bool
startSessionMode: str
theme: str
class SearchResult(OpenResponse):
# Serper values have historically passed through, including nulls, numbers,
# and objects. The service guarantees these keys, not their value types.
title: Any
snippet: Any
url: Any
class SearchResponse(OpenResponse):
query: str
answer: Any
results: list[SearchResult]
class ReportEntry(OpenResponse):
sourceScheduleLabel: Any
date: Any
class ReportsResponse(OpenResponse):
count: int
wrappedLen: int
hints: list[str]
entries: list[ReportEntry]
rawCount: int | None = None
cap: int | None = None
skipped: bool | None = None
reason: str | None = None
truncated: bool | None = None
note: str | None = None
class ReasoningResponse(OpenResponse):
answer: str
class AllocationResponse(OpenResponse):
"""LB-owned object: no new required fields or value-type restrictions."""
state: Any = None
session_id: Any = None
connect_url: Any = None
pending_timeout_s: Any = None
queue_id: Any = None
position: Any = None
poll_interval_s: Any = None
class UserProfileResponse(RootModel[Any]):
"""The profile endpoint relays objects, arrays, scalars, and null verbatim."""
class QueueCancellationResponse(OpenResponse):
ok: bool