From ef0b7e8e9afb4ef3115743743e4cc272a03842a9 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 03:18:00 +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 - src/agora_agent/types/gemini_asr_params.py | 14 +++---- .../types/speechmatics_asr_params.py | 37 +------------------ 4 files changed, 9 insertions(+), 46 deletions(-) diff --git a/.fern/metadata.json b/.fern/metadata.json index 076b99b..0f155d5 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -14,5 +14,5 @@ }, "exclude_types_from_init_exports": true }, - "originGitCommit": "6a634e48a5b865d82e50104935887a73a9794836" + "originGitCommit": "37ba641a90aa4496eb97146f05555706aaf92670" } \ 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/types/gemini_asr_params.py b/src/agora_agent/types/gemini_asr_params.py index b31e0aa..0e9714a 100644 --- a/src/agora_agent/types/gemini_asr_params.py +++ b/src/agora_agent/types/gemini_asr_params.py @@ -14,27 +14,27 @@ class GeminiAsrParams(UncheckedBaseModel): api_key: str = pydantic.Field() """ - Google Gemini API key + The Google Gemini API key used to authenticate requests. """ model: str = pydantic.Field() """ - Google Gemini model to use for transcription + The Gemini transcription model identifier. """ sample_rate: typing.Optional[int] = pydantic.Field(default=None) """ - Audio sample rate in Hz + The audio sample rate in Hz. """ - language: str = pydantic.Field() + language: typing.Optional[str] = pydantic.Field(default=None) """ - Language code for speech recognition + The language code for speech recognition. This takes precedence over the top-level `asr.language` value. """ - word_timestamp: bool = pydantic.Field() + word_timestamp: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether to include word-level timestamps in transcription results + Whether to include word-level timestamps in the transcription results. """ 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 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: From 4c23a8e760ad602211a9bc178560736f0ceb1bf8 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 03:18:00 +0000 Subject: [PATCH 2/2] [fern-replay] Applied customizations Patches applied (2): - patch-13d8e068: chore: ignore local venv and planning docs - patch-a065088b: fix(vendors): send Speechmatics STT key instead of api_key --- .fern/replay.lock | 13 +++++-- .gitignore | 2 + .../types/speechmatics_asr_params.py | 37 ++++++++++++++++++- 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/.fern/replay.lock b/.fern/replay.lock index 8438de8..9c78b96 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -54,14 +54,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 4.37.0 -current_generation: 61e50e75b995a0affce86c308b74caba165c92bb + - commit_sha: 48b0250bddbc7acc02cd9da9fa06c1fefe1dd0f7 + tree_hash: c910ba9b2fa7adc0e4798088edcfbfabbb367571 + timestamp: 2026-09-01T03:17:57.884Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 4.37.0 +current_generation: 48b0250bddbc7acc02cd9da9fa06c1fefe1dd0f7 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: 61e50e75b995a0affce86c308b74caba165c92bb + base_generation: 48b0250bddbc7acc02cd9da9fa06c1fefe1dd0f7 files: - .gitignore patch_content: | @@ -90,7 +96,7 @@ patches: original_commit: a065088b4c45e2ca7e1bb91b1a899b8444800121 original_message: "fix(vendors): send Speechmatics STT key instead of api_key" original_author: digitallysavvy - base_generation: 61e50e75b995a0affce86c308b74caba165c92bb + base_generation: 48b0250bddbc7acc02cd9da9fa06c1fefe1dd0f7 files: - src/agora_agent/types/speechmatics_asr_params.py patch_content: | @@ -227,3 +233,4 @@ patches: frozen = True smart_union = True extra = pydantic.Extra.allow + user_owned: true 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/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: