From 24c405e32e8986eda9e2b6bb9cddd3e1202cd614 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 13:10:55 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.37.0 --- .fern/metadata.json | 2 +- .gitignore | 2 - ...ts_request_properties_advanced_features.py | 2 +- ...request_properties_filler_words_content.py | 2 +- ...s_filler_words_content_generated_config.py | 14 +- ...s_content_generated_config_llm_provider.py | 2 +- src/agora_agent/core/client_wrapper.py | 4 +- src/agora_agent/types/asr.py | 17 +++ src/agora_agent/types/llm_tool.py | 19 ++- src/agora_agent/types/mcp_server.py | 54 ++++++++ src/agora_agent/types/mllm.py | 20 +++ src/agora_agent/types/smallest_ai_asr.py | 30 +++++ .../types/smallest_ai_asr_params.py | 127 ++++++++++++++++++ src/agora_agent/types/smallest_ai_tts.py | 29 ++++ .../types/smallest_ai_tts_params.py | 82 +++++++++++ .../types/speechmatics_asr_params.py | 37 +---- src/agora_agent/types/tts.py | 17 +++ 17 files changed, 411 insertions(+), 49 deletions(-) create mode 100644 src/agora_agent/types/mcp_server.py create mode 100644 src/agora_agent/types/smallest_ai_asr.py create mode 100644 src/agora_agent/types/smallest_ai_asr_params.py create mode 100644 src/agora_agent/types/smallest_ai_tts.py create mode 100644 src/agora_agent/types/smallest_ai_tts_params.py diff --git a/.fern/metadata.json b/.fern/metadata.json index f4f7a0d..7881670 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -14,5 +14,5 @@ }, "exclude_types_from_init_exports": true }, - "originGitCommit": "3fdb45ab45802742325afca544fdc22f5ae58db8" + "originGitCommit": "ca763cb23651d522cb380db79b5d16547e7bd8ff" } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3e30921..d2e4ca8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,3 @@ __pycache__/ dist/ poetry.toml -.venv/ -docs/superpowers/ diff --git a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py index 667e20e..e75f098 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py @@ -29,7 +29,7 @@ class StartAgentsRequestPropertiesAdvancedFeatures(UncheckedBaseModel): enable_tools: typing.Optional[bool] = pydantic.Field(default=None) """ - Enable invocation for MCP servers and inline REST tools. + Enable tool invocation. When enabled, the agent can invoke tools provided by the MCP server to implement advanced functionality. """ if IS_PYDANTIC_V2: diff --git a/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content.py b/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content.py index 5e13764..10f0454 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content.py @@ -25,7 +25,7 @@ class StartAgentsRequestPropertiesFillerWordsContent(UncheckedBaseModel): """ Filler word content mode: - `static`: Static filler words. Uses a predefined list of filler words. - - `generated`: LLM-generated filler words based on the last user message. + - `generated`: LLM-generated filler words based on recent conversation context. """ static_config: typing.Optional[StartAgentsRequestPropertiesFillerWordsContentStaticConfig] = pydantic.Field( diff --git a/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config.py b/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config.py index b51ac8e..4bb3735 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config.py @@ -19,12 +19,12 @@ class StartAgentsRequestPropertiesFillerWordsContentGeneratedConfig(UncheckedBas pydantic.Field(default=None) ) """ - OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM and only uses the last user message as input. + OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM. """ prompt: typing.Optional[str] = pydantic.Field(default=None) """ - System prompt used to generate a short filler phrase based on the last user message. The generated text should be conversational and must not answer the user's question. + System prompt used to generate a short filler phrase based on recent conversation context. The generated text should be conversational and must not answer the user's question. """ fallback_strategy: typing.Optional[typing.Literal["static"]] = pydantic.Field(default=None) @@ -32,6 +32,16 @@ class StartAgentsRequestPropertiesFillerWordsContentGeneratedConfig(UncheckedBas Fallback strategy when generated filler text is not ready, fails, or returns empty text. Phase 1 only supports `static`. """ + context_message_limit: typing.Optional[int] = pydantic.Field(default=None) + """ + Maximum number of recent conversation messages used to generate a filler word. + """ + + history_character_limit: typing.Optional[int] = pydantic.Field(default=None) + """ + Maximum number of characters from conversation history used to generate a filler word. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config_llm_provider.py b/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config_llm_provider.py index 34d3391..55c434c 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config_llm_provider.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_filler_words_content_generated_config_llm_provider.py @@ -9,7 +9,7 @@ class StartAgentsRequestPropertiesFillerWordsContentGeneratedConfigLlmProvider(UncheckedBaseModel): """ - OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM and only uses the last user message as input. + OpenAI-compatible LLM provider used to generate filler words. Runs in parallel with the main business LLM. """ url: str = pydantic.Field() diff --git a/src/agora_agent/core/client_wrapper.py b/src/agora_agent/core/client_wrapper.py index 42c776b..728eb53 100644 --- a/src/agora_agent/core/client_wrapper.py +++ b/src/agora_agent/core/client_wrapper.py @@ -26,10 +26,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "agora-agents/v2.8.1", + "User-Agent": "agora-agents/v2.9.0", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "agora-agents", - "X-Fern-SDK-Version": "v2.8.1", + "X-Fern-SDK-Version": "v2.9.0", **(self.get_custom_headers() or {}), } headers["Authorization"] = httpx.BasicAuth(self._get_username(), self._get_password())._auth_header diff --git a/src/agora_agent/types/asr.py b/src/agora_agent/types/asr.py index 2f62cc6..838ea54 100644 --- a/src/agora_agent/types/asr.py +++ b/src/agora_agent/types/asr.py @@ -19,6 +19,7 @@ from .microsoft_asr_params import MicrosoftAsrParams from .open_ai_asr_params import OpenAiAsrParams from .sarvam_asr_params import SarvamAsrParams +from .smallest_ai_asr_params import SmallestAiAsrParams from .speechmatics_asr_params import SpeechmaticsAsrParams from .tencent_asr_params import TencentAsrParams from .x_ai_asr_params import XAiAsrParams @@ -269,6 +270,21 @@ class Config: extra = pydantic.Extra.allow +class Asr_Smallestai(UncheckedBaseModel): + vendor: typing.Literal["smallestai"] = "smallestai" + language: typing.Optional[str] = None + params: SmallestAiAsrParams + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + Asr = typing_extensions.Annotated[ typing.Union[ Asr_Ares, @@ -287,6 +303,7 @@ class Config: Asr_Xfyun, Asr_XfyunBigmodel, Asr_XfyunDialect, + Asr_Smallestai, ], UnionMetadata(discriminant="vendor"), ] diff --git a/src/agora_agent/types/llm_tool.py b/src/agora_agent/types/llm_tool.py index 2ab8e40..b5b190e 100644 --- a/src/agora_agent/types/llm_tool.py +++ b/src/agora_agent/types/llm_tool.py @@ -21,9 +21,22 @@ class LlmTool(UncheckedBaseModel): Tool type. Must be `function`. """ - function: LlmToolFunction - execution: typing.Optional[LlmToolExecution] = None - server: LlmToolServer + function: LlmToolFunction = pydantic.Field() + """ + Tool interface exposed to the model. `parameters` is the JSON Schema for LLM arguments, not the HTTP request shape. + """ + + execution: typing.Optional[LlmToolExecution] = pydantic.Field(default=None) + """ + Tool execution configuration. Defaults to `{"mode": "sync"}`. Phase 1a only allows `sync`. + """ + + server: LlmToolServer = pydantic.Field() + """ + Actual HTTP request configuration for this REST tool. + Does not use top-level `parameters`, `path_params`, standalone `query`, + `response`, `json_path`, or `max_chars`. + """ if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/agora_agent/types/mcp_server.py b/src/agora_agent/types/mcp_server.py new file mode 100644 index 0000000..c5920e5 --- /dev/null +++ b/src/agora_agent/types/mcp_server.py @@ -0,0 +1,54 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class McpServer(UncheckedBaseModel): + name: str = pydantic.Field() + """ + A unique identifier for the MCP server. Maximum 48 characters. Accepts only English letters and numbers. + """ + + endpoint: str = pydantic.Field() + """ + The endpoint address of the MCP server. The agent uses this to communicate with the MCP server. + """ + + transport: typing.Optional[typing.Literal["streamable_http"]] = pydantic.Field(default=None) + """ + Transport protocol type. + - `streamable_http`: Streaming HTTP protocol + """ + + headers: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None) + """ + HTTP header information to include when requesting the MCP server, such as authentication information. + """ + + allowed_tools: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + A list of tools that the agent is allowed to invoke. The agent can only use tools on this list. + - Empty or omitted: All tools are enabled. + - Empty array `[]`: No tools are enabled. + - `["*"]`: All tools are enabled. + - Specific tools `["aa", "bb"]`: Only listed tools are enabled. + - Mix with wildcard `["aa", "*"]`: All tools are enabled (wildcard takes precedence). + """ + + timeout_ms: typing.Optional[int] = pydantic.Field(default=None) + """ + The MCP server request timeout in milliseconds. After timeout, the agent stops waiting for the MCP server's response and continues executing subsequent logic. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/types/mllm.py b/src/agora_agent/types/mllm.py index acc7171..655f2e8 100644 --- a/src/agora_agent/types/mllm.py +++ b/src/agora_agent/types/mllm.py @@ -5,6 +5,8 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .llm_tool import LlmTool +from .mcp_server import McpServer from .mllm_params import MllmParams from .mllm_turn_detection import MllmTurnDetection from .mllm_vendor import MllmVendor @@ -76,6 +78,24 @@ class Mllm(UncheckedBaseModel): Agent failure message. """ + tools: typing.Optional[typing.List[LlmTool]] = pydantic.Field(default=None) + """ + Inline REST (pass-through sync) tool definitions for standard text LLM function calling. + Required fields per tool: `type`, `function.name`, `function.parameters` + (`type: object` with `properties`), `server.method` (`GET` or `POST`), and `server.url`. + The combination of `type: function` and `server` identifies a REST tool. + Phase 1a supports GET and POST only; `execution.mode` defaults to and only accepts `sync`. + Template rules: + - Values must be a constant, or exactly one single-level placeholder. + - `{{args.}}`: `server.url` and `server.body` only; not allowed in headers. + - `{{template_variables.}}` and `{{tool_call_id}}`: `server.url`, `server.headers`, and `server.body`. + """ + + mcp_servers: typing.Optional[typing.List[McpServer]] = pydantic.Field(default=None) + """ + MCP server configuration. + """ + vendor: typing.Optional[MllmVendor] = pydantic.Field(default=None) """ MLLM provider. diff --git a/src/agora_agent/types/smallest_ai_asr.py b/src/agora_agent/types/smallest_ai_asr.py new file mode 100644 index 0000000..e38f417 --- /dev/null +++ b/src/agora_agent/types/smallest_ai_asr.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .smallest_ai_asr_params import SmallestAiAsrParams + + +class SmallestAiAsr(UncheckedBaseModel): + """ + Smallest AI ASR configuration. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language code for speech recognition. + """ + + params: SmallestAiAsrParams + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/types/smallest_ai_asr_params.py b/src/agora_agent/types/smallest_ai_asr_params.py new file mode 100644 index 0000000..a888b11 --- /dev/null +++ b/src/agora_agent/types/smallest_ai_asr_params.py @@ -0,0 +1,127 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SmallestAiAsrParams(UncheckedBaseModel): + """ + Smallest AI ASR configuration parameters. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language code for speech recognition. This takes precedence over the top-level `asr.language` value. + """ + + url: typing.Optional[str] = pydantic.Field(default=None) + """ + WebSocket endpoint for the Smallest AI streaming STT API. + """ + + api_key: str = pydantic.Field() + """ + Smallest AI API key. + """ + + sample_rate: typing.Optional[int] = pydantic.Field(default=None) + """ + Input audio sample rate in Hz. + """ + + encoding: typing.Optional[str] = pydantic.Field(default=None) + """ + Input audio encoding. + """ + + word_timestamps: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to include word-level timestamps. + """ + + sentence_timestamps: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to include sentence-level timestamps. + """ + + diarize: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to enable speaker diarization. + """ + + vad_events: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to return voice activity detection events. + """ + + endpointing: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to enable endpoint detection. + """ + + eou_timeout_ms: typing.Optional[int] = pydantic.Field(default=None) + """ + End-of-utterance timeout in milliseconds. + """ + + format: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to format the transcript. + """ + + finalize_on_words: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to finalize results based on recognized words. + """ + + max_words: typing.Optional[str] = pydantic.Field(default=None) + """ + Maximum number of words per result. + """ + + punctuate: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to add punctuation. + """ + + capitalize: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to capitalize transcript text. + """ + + itn_normalize: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to enable inverse text normalization. + """ + + full_transcript: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to return the full transcript. + """ + + keywords: typing.Optional[str] = pydantic.Field(default=None) + """ + Comma-separated keyword boosts in `keyword:weight` format. + """ + + redact_pii: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to redact personally identifiable information. + """ + + redact_pci: typing.Optional[str] = pydantic.Field(default=None) + """ + Whether to redact payment card information. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/types/smallest_ai_tts.py b/src/agora_agent/types/smallest_ai_tts.py new file mode 100644 index 0000000..2046a84 --- /dev/null +++ b/src/agora_agent/types/smallest_ai_tts.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .smallest_ai_tts_params import SmallestAiTtsParams + + +class SmallestAiTts(UncheckedBaseModel): + """ + Smallest AI Text-to-Speech configuration. + """ + + params: SmallestAiTtsParams + skip_patterns: typing.Optional[typing.List[int]] = pydantic.Field(default=None) + """ + Controls whether the TTS module skips bracketed content when reading LLM response text. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/types/smallest_ai_tts_params.py b/src/agora_agent/types/smallest_ai_tts_params.py new file mode 100644 index 0000000..9800e7d --- /dev/null +++ b/src/agora_agent/types/smallest_ai_tts_params.py @@ -0,0 +1,82 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class SmallestAiTtsParams(UncheckedBaseModel): + """ + Smallest AI TTS configuration parameters. + """ + + url: typing.Optional[str] = pydantic.Field(default=None) + """ + HTTP endpoint for the Smallest AI streaming TTS API. + """ + + api_key: str = pydantic.Field() + """ + Smallest AI API key. + """ + + model: typing.Optional[str] = pydantic.Field(default=None) + """ + Smallest AI TTS model name. + """ + + voice_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Smallest AI voice identifier. + """ + + sample_rate: typing.Optional[int] = pydantic.Field(default=None) + """ + Output audio sample rate in Hz. + """ + + speed: typing.Optional[float] = pydantic.Field(default=None) + """ + Speech rate multiplier. + """ + + language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language code for speech synthesis. + """ + + number_pronunciation_language: typing.Optional[str] = pydantic.Field(default=None) + """ + Language used to pronounce numbers. + """ + + math_notation: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to verbalize mathematical notation. + """ + + pronunciation_dicts: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Pronunciation dictionaries applied during synthesis. + """ + + session_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Client-provided session identifier. + """ + + request_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Client-provided request identifier. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/agora_agent/types/speechmatics_asr_params.py b/src/agora_agent/types/speechmatics_asr_params.py index c1b7232..4709d22 100644 --- a/src/agora_agent/types/speechmatics_asr_params.py +++ b/src/agora_agent/types/speechmatics_asr_params.py @@ -12,19 +12,11 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): Speechmatics ASR configuration parameters. """ - key: typing.Optional[str] = pydantic.Field(default=None) + api_key: str = pydantic.Field() """ Speechmatics API key """ - api_key: typing.Optional[str] = pydantic.Field( - default=None, - deprecated="Use key instead.", - ) - """ - Deprecated alias for key. The SDK normalizes it to key during validation. - """ - language: str = pydantic.Field() """ Language code to use for transcription @@ -35,33 +27,6 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): WebSocket URL for the Speechmatics streaming API """ - if IS_PYDANTIC_V2: - - @pydantic.model_validator(mode="before") - @classmethod - def _normalize_api_key(cls, values: typing.Any) -> typing.Any: - if not isinstance(values, typing.Mapping): - return values - normalized = dict(values) - legacy_key = normalized.pop("api_key", None) - if legacy_key is not None: - normalized.setdefault("key", legacy_key) - if normalized.get("key") is None: - raise ValueError("SpeechmaticsAsrParams requires key") - return normalized - - else: - - @pydantic.root_validator(pre=True) - def _normalize_api_key(cls, values: typing.Dict[str, typing.Any]) -> typing.Dict[str, typing.Any]: - normalized = dict(values) - legacy_key = normalized.pop("api_key", None) - if legacy_key is not None: - normalized.setdefault("key", legacy_key) - if normalized.get("key") is None: - raise ValueError("SpeechmaticsAsrParams requires key") - return normalized - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/agora_agent/types/tts.py b/src/agora_agent/types/tts.py index 662a81c..ce737ad 100644 --- a/src/agora_agent/types/tts.py +++ b/src/agora_agent/types/tts.py @@ -28,6 +28,7 @@ from .rime_tts_credential_mode import RimeTtsCredentialMode from .rime_tts_params import RimeTtsParams from .sarvam_tts_params import SarvamTtsParams +from .smallest_ai_tts_params import SmallestAiTtsParams from .stepfun_tts_params import StepfunTtsParams from .tencent_tts_params import TencentTtsParams from .typecast_tts_params import TypecastTtsParams @@ -382,6 +383,21 @@ class Config: extra = pydantic.Extra.allow +class Tts_Smallestai(UncheckedBaseModel): + vendor: typing.Literal["smallestai"] = "smallestai" + params: SmallestAiTtsParams + skip_patterns: typing.Optional[typing.List[int]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow + + Tts = typing_extensions.Annotated[ typing.Union[ Tts_Tencent, @@ -407,6 +423,7 @@ class Config: Tts_Gradium, Tts_Mistral, Tts_Typecast, + Tts_Smallestai, ], UnionMetadata(discriminant="vendor"), ] From 070bdb7b4bb152d30fec51a854210b4e4e411d7f Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 13:10:56 +0000 Subject: [PATCH 2/2] [fern-replay] Applied customizations Patches applied (3): - patch-13d8e068: chore: ignore local venv and planning docs - patch-a065088b: fix(vendors): send Speechmatics STT key instead of api_key - patch-33a436b3: fix: address v2.8.0 release review findings Patches with unresolved conflicts (1): - patch-8465addc: chore: prepare v2.8.1 release Run `fern-replay resolve` to apply these customizations. --- .fern/replay.lock | 78 ++++++++++++++++++- .gitignore | 2 + ...ts_request_properties_advanced_features.py | 2 +- .../types/speechmatics_asr_params.py | 37 ++++++++- 4 files changed, 114 insertions(+), 5 deletions(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index a1ce605..4706598 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -66,14 +66,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 4.37.0 -current_generation: 3885ea61224cbf0671c305350b8d1cddef509443 + - commit_sha: 4a4b233d1b5625935298cd616667aabe4830c79d + tree_hash: ffe2f53e14f3ff105b6d75d5a957821aac6150f6 + timestamp: 2026-09-14T13:10:51.974Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 4.37.0 +current_generation: 4a4b233d1b5625935298cd616667aabe4830c79d patches: - id: patch-13d8e068 content_hash: sha256:97d879ab169016b9abaf1866427a8ebc45af608f69e063a07e5126c9613c329b original_commit: 13d8e0683ffa08bcfc9a381eb9604adf5abdbe0b original_message: "chore: ignore local venv and planning docs" original_author: plutoless - base_generation: 3885ea61224cbf0671c305350b8d1cddef509443 + base_generation: 4a4b233d1b5625935298cd616667aabe4830c79d files: - .gitignore patch_content: | @@ -102,7 +108,7 @@ patches: original_commit: a065088b4c45e2ca7e1bb91b1a899b8444800121 original_message: "fix(vendors): send Speechmatics STT key instead of api_key" original_author: digitallysavvy - base_generation: 3885ea61224cbf0671c305350b8d1cddef509443 + base_generation: 4a4b233d1b5625935298cd616667aabe4830c79d files: - src/agora_agent/types/speechmatics_asr_params.py patch_content: | @@ -240,3 +246,69 @@ patches: smart_union = True extra = pydantic.Extra.allow user_owned: true + - id: patch-33a436b3 + content_hash: sha256:04db41b4eefe647eab420cbfbf8b86e78a2f42fb3c72122e535b149b89bc3459 + original_commit: 33a436b3bdb6f2a6fe4d8987b6536c2f0ac2862e + original_message: "fix: address v2.8.0 release review findings" + original_author: digitallysavvy + base_generation: 4a4b233d1b5625935298cd616667aabe4830c79d + files: + - src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py + patch_content: | + diff --git a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py + index e75f098..667e20e 100644 + --- a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py + +++ b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py + @@ -29,7 +29,7 @@ class StartAgentsRequestPropertiesAdvancedFeatures(UncheckedBaseModel): + + enable_tools: typing.Optional[bool] = pydantic.Field(default=None) + """ + - Enable tool invocation. When enabled, the agent can invoke tools provided by the MCP server to implement advanced functionality. + + Enable invocation for MCP servers and inline REST tools. + """ + + if IS_PYDANTIC_V2: + theirs_snapshot: + src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py: | + # This file was auto-generated by Fern from our API Definition. + + import typing + + import pydantic + from ...core.pydantic_utilities import IS_PYDANTIC_V2 + from ...core.unchecked_base_model import UncheckedBaseModel + + + class StartAgentsRequestPropertiesAdvancedFeatures(UncheckedBaseModel): + """ + Advanced features configuration. + """ + + enable_mllm: typing.Optional[bool] = pydantic.Field(default=None) + """ + Use `mllm.enable` instead. Enable Multimodal Large Language Model for voice-to-voice processing. Enabling MLLM automatically disables ASR, LLM, and TTS since the MLLM handles end-to-end voice processing directly. See `turn_detection.type` for turn detection options available with MLLM. + """ + + enable_rtm: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether to enable the Signaling (RTM) service. When enabled, the agent can combine the capabilities provided by Signaling to implement advanced functions, such as delivering custom information. Before enabling the Signaling service, make sure the token includes both RTC and RTM privileges. + """ + + enable_sal: typing.Optional[bool] = pydantic.Field(default=None) + """ + Enable Selective Attention Locking (SAL). When enabled, configure the `sal` field to set up speaker recognition or locking modes. + """ + + enable_tools: typing.Optional[bool] = pydantic.Field(default=None) + """ + Enable invocation for MCP servers and inline REST tools. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/.gitignore b/.gitignore index d2e4ca8..3e30921 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ __pycache__/ dist/ poetry.toml +.venv/ +docs/superpowers/ diff --git a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py index e75f098..667e20e 100644 --- a/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py +++ b/src/agora_agent/agents/types/start_agents_request_properties_advanced_features.py @@ -29,7 +29,7 @@ class StartAgentsRequestPropertiesAdvancedFeatures(UncheckedBaseModel): enable_tools: typing.Optional[bool] = pydantic.Field(default=None) """ - Enable tool invocation. When enabled, the agent can invoke tools provided by the MCP server to implement advanced functionality. + Enable invocation for MCP servers and inline REST tools. """ if IS_PYDANTIC_V2: diff --git a/src/agora_agent/types/speechmatics_asr_params.py b/src/agora_agent/types/speechmatics_asr_params.py index 4709d22..c1b7232 100644 --- a/src/agora_agent/types/speechmatics_asr_params.py +++ b/src/agora_agent/types/speechmatics_asr_params.py @@ -12,11 +12,19 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): Speechmatics ASR configuration parameters. """ - api_key: str = pydantic.Field() + key: typing.Optional[str] = pydantic.Field(default=None) """ Speechmatics API key """ + api_key: typing.Optional[str] = pydantic.Field( + default=None, + deprecated="Use key instead.", + ) + """ + Deprecated alias for key. The SDK normalizes it to key during validation. + """ + language: str = pydantic.Field() """ Language code to use for transcription @@ -27,6 +35,33 @@ class SpeechmaticsAsrParams(UncheckedBaseModel): WebSocket URL for the Speechmatics streaming API """ + if IS_PYDANTIC_V2: + + @pydantic.model_validator(mode="before") + @classmethod + def _normalize_api_key(cls, values: typing.Any) -> typing.Any: + if not isinstance(values, typing.Mapping): + return values + normalized = dict(values) + legacy_key = normalized.pop("api_key", None) + if legacy_key is not None: + normalized.setdefault("key", legacy_key) + if normalized.get("key") is None: + raise ValueError("SpeechmaticsAsrParams requires key") + return normalized + + else: + + @pydantic.root_validator(pre=True) + def _normalize_api_key(cls, values: typing.Dict[str, typing.Any]) -> typing.Dict[str, typing.Any]: + normalized = dict(values) + legacy_key = normalized.pop("api_key", None) + if legacy_key is not None: + normalized.setdefault("key", legacy_key) + if normalized.get("key") is None: + raise ValueError("SpeechmaticsAsrParams requires key") + return normalized + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: