Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "5.44.2",
"cliVersion": "5.44.6",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "5.14.8",
"generatorVersion": "5.14.18",
"generatorConfig": {
"client": {
"class_name": "BaseClient",
Expand All @@ -16,8 +16,8 @@
"skip_validation": true
}
},
"originGitCommit": "d228f82e93aaa8aa77f978d458cf912f3daaa8c1",
"originGitCommit": "8dd6f48a06eee8c3985894f68ba3b554e5564d21",
"originGitCommitIsDirty": true,
"invokedBy": "manual",
"sdkVersion": "7.3.1"
"sdkVersion": "7.3.2"
}
36 changes: 35 additions & 1 deletion .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ src/deepgram/speak/v1/socket_client.py
src/deepgram/agent/v1/types/agent_v1settings_agent_context.py
src/deepgram/agent/v1/types/agent_v1settings_agent.py
src/deepgram/agent/v1/types/agent_v1settings.py
src/deepgram/agent/v1/types/agent_v1settings_audio_output.py
src/deepgram/agent/v1/requests/agent_v1settings_agent_context.py
src/deepgram/agent/v1/requests/agent_v1settings_agent.py
src/deepgram/agent/v1/requests/agent_v1settings.py
Expand Down Expand Up @@ -74,6 +73,33 @@ src/deepgram/agent/v1/requests/agent_v1settings_agent_context_listen_provider_v2
src/deepgram/agent/v1/requests/agent_v1settings_agent_listen_provider_v1.py
src/deepgram/agent/v1/requests/agent_v1settings_agent_listen_provider_v2.py

# Hand-written compat shims recreating the top-level DeepgramListenProviderV2LanguageHint
# type/param that Fern removed in the 2026-06-15 regen (Union[str, List[str]]). The
# *V2LanguageHint listen-provider aliases above import these, and they remain part of the
# public import surface, so they are recreated by hand and frozen so Fern won't delete them.
src/deepgram/types/deepgram_listen_provider_v2language_hint.py
src/deepgram/requests/deepgram_listen_provider_v2language_hint.py

# Behavioral back-compat shim for the language_hint -> language_hints rename (2026-06-15
# regen). The public field was historically (incorrectly) named `language_hint`, accepting
# a str or a list; the API field is `language_hints` (a list, and the server uses
# deny_unknown_fields so the singular key is rejected on the wire). These three generated
# models carry a hand-added model_validator(mode='before') / root_validator(pre=True) that
# remaps a legacy `language_hint=` kwarg to `language_hints` and drops the dead singular
# key. Frozen so Fern won't strip the validator on regen. Remove the shim and unfreeze when
# the singular alias is intentionally retired in a future major release.
src/deepgram/types/deepgram_listen_provider_v2.py
src/deepgram/agent/v1/types/agent_v1settings_agent_listen_provider.py
src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider.py

# Hand-written compat shim recreating ListenV2CloseStreamType, which Fern removed in the
# 2026-06-15 regen (docs #946). The original generated type wrongly allowed
# Union[Literal["Finalize","CloseStream","KeepAlive"], Any] — v2 copied v1's control-message
# enum, but a CloseStream message's `type` can only ever be "CloseStream". Recreated as the
# corrected single-value Literal["CloseStream"] to preserve the public import path without
# resurrecting the invalid values. Frozen so Fern won't delete it again.
src/deepgram/listen/v2/types/listen_v2close_stream_type.py

# Package __init__.py files that carry hand-applied legacy alias re-exports for the
# above shims. Fern would otherwise regenerate these and strip the legacy entries on
# every regen. Frozen to preserve the public-import surface for renamed types/params.
Expand All @@ -85,6 +111,10 @@ src/deepgram/agent/v1/types/__init__.py
src/deepgram/agent/v1/requests/__init__.py
src/deepgram/types/__init__.py
src/deepgram/requests/__init__.py
# listen __init__.py files re-export the ListenV2CloseStreamType shim above.
src/deepgram/listen/__init__.py
src/deepgram/listen/v2/__init__.py
src/deepgram/listen/v2/types/__init__.py

# Coerces Python bools to lowercase "true"/"false" before urlencode, which
# otherwise stringifies via str() and produces "True"/"False" — rejected by
Expand All @@ -96,8 +126,12 @@ src/deepgram/core/query_encoder.py
# Hand-written custom tests
tests/custom/test_agent_history.py
tests/custom/test_compat_aliases.py
tests/custom/test_language_hint_compat.py
tests/custom/test_language_hints_feature.py
tests/custom/test_listen_v2_regen_constraints.py
tests/custom/test_query_encoder.py
tests/custom/test_secure_logging.py
tests/custom/test_socket_client_shims.py
tests/custom/test_text_builder.py
tests/custom/test_transport.py
tests/typecheck/compat_aliases.py
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
run: poetry install
- name: Compile
run: poetry run mypy src/
- name: Typecheck tests
run: poetry run mypy tests/typecheck
test:
runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Current permanently frozen files:
- `src/deepgram/agent/v1/requests/agent_v1history_content.py`, `src/deepgram/agent/v1/requests/agent_v1history_function_calls.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_content.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_messages_item_function_calls_function_calls_item.py` — hand-written compatibility aliases preserving old public Agent History request-param imports after regen renames
- `src/deepgram/types/create_key_v1request_one.py`, `src/deepgram/requests/create_key_v1request_one.py` — hand-written compatibility aliases preserving the old public create-key request imports after the regen rename to `CreateKeyV1Request`
- `src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider_v1.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider_v2.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_context_listen_provider_v2language_hint.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_listen_provider_v1.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent_listen_provider_v2.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_listen_provider_v1.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_listen_provider_v2.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context_listen_provider_v2language_hint.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_listen_provider_v1.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_listen_provider_v2.py` — hand-written compatibility aliases for the 2026-05-14 spec dedup that consolidated `AgentV1SettingsAgent[Context]ListenProviderV{1,2,V2LanguageHint}` into top-level `DeepgramListenProvider*` types
- `src/deepgram/types/deepgram_listen_provider_v2language_hint.py`, `src/deepgram/requests/deepgram_listen_provider_v2language_hint.py` — hand-written shims recreating the top-level `DeepgramListenProviderV2LanguageHint`/`...Params` type (`Union[str, List[str]]`) that Fern removed in the 2026-06-15 regen. The `*V2LanguageHint` listen-provider aliases above import from these and they remain part of the public import surface, so they are recreated by hand and frozen so Fern won't delete them again
- `src/deepgram/listen/v2/types/listen_v2close_stream_type.py` — hand-written shim recreating `ListenV2CloseStreamType`, which Fern removed in the 2026-06-15 regen (docs #946). The original generated type wrongly allowed `Union[Literal["Finalize","CloseStream","KeepAlive"], Any]` (v2 copied v1's control-message enum); a CloseStream message's `type` can only ever be `"CloseStream"`. Recreated as the corrected `Literal["CloseStream"]` to preserve the public import path without resurrecting the invalid values. Re-exported from the three `listen` `__init__.py` files (temporarily frozen, below).
- `src/deepgram/transport_interface.py`, `src/deepgram/transport.py`, `src/deepgram/transports/` — custom transport layer
- `tests/custom/test_agent_history.py` — hand-written regression test for Agent History websocket payload parsing
- `tests/custom/test_compat_aliases.py` — hand-written regression test for backward-compatible alias imports after regen renames
Expand All @@ -55,10 +57,10 @@ Current temporarily frozen files:
- `src/deepgram/listen/v2/socket_client.py` — same + `send_configure` typing.Any/raw shim, response Union uses typing.Any instead of `ListenV2ConfigureSuccess`
- `src/deepgram/agent/v1/socket_client.py` — same + `_sanitize_numeric_types`
- `src/deepgram/agent/v1/types/agent_v1settings_agent_context.py`, `src/deepgram/agent/v1/types/agent_v1settings_agent.py`, `src/deepgram/agent/v1/types/agent_v1settings.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent_context.py`, `src/deepgram/agent/v1/requests/agent_v1settings_agent.py`, `src/deepgram/agent/v1/requests/agent_v1settings.py` — backward-compat patches for the 2026-05-05 Agent Settings schema restructure. These preserve callable `AgentV1SettingsAgent(...)`, keep `AgentV1Settings.agent` accepting both that wrapper and `agent_id` strings, restore the legacy request TypedDict shapes, remap legacy `messages=[...]` / nested `context=AgentV1SettingsAgentContext(messages=[...])` usage into the new `context={"messages": [...]}` wire shape, and keep read-side `obj.messages` access working.
- `src/deepgram/agent/v1/types/agent_v1settings_audio_output.py` — keeps `audio.output.container` typed as `str` for backward compatibility instead of the regenerated enum alias
- `src/deepgram/core/query_encoder.py` — coerces Python bools to lowercase `"true"`/`"false"` before they reach `urllib.parse.urlencode` (which would otherwise produce `"True"`/`"False"` via `str()` and break websocket query strings). Only the four `*/connect()` paths call `urlencode`; HTTP raw clients hand params to httpx, which lowercases bools itself, so the patch is a no-op for the HTTP path. Once Fern's websocket codegen normalizes bools (or the spec types these as `boolean` end-to-end), this can be unfrozen.
- `tests/wire/test_manage_v1_projects_keys.py` — restored wire coverage for the legacy `CreateKeyV1RequestOneParams` request alias so future regens do not silently drop that compatibility check
- `src/deepgram/__init__.py`, `src/deepgram/agent/__init__.py`, `src/deepgram/agent/v1/__init__.py`, `src/deepgram/agent/v1/types/__init__.py`, `src/deepgram/agent/v1/requests/__init__.py`, `src/deepgram/types/__init__.py`, `src/deepgram/requests/__init__.py` — package `__init__.py` files carrying hand-applied legacy alias re-exports for `CreateKeyV1RequestOne`, `AgentV1HistoryContent`, `AgentV1HistoryFunctionCalls`, `AgentV1SettingsAgentContextMessagesItemContent`, `AgentV1SettingsAgentContextMessagesItemFunctionCalls` (and their `*Params` variants). Fern would otherwise regenerate these and strip the legacy entries. After unfreezing for the next regen and reviewing the new generated content, re-apply the legacy re-exports plus any genuine new entries Fern added.
- `src/deepgram/listen/__init__.py`, `src/deepgram/listen/v2/__init__.py`, `src/deepgram/listen/v2/types/__init__.py` — `__init__.py` files re-exporting the hand-written `ListenV2CloseStreamType` shim. Frozen so Fern won't strip the re-export on regen. Same handling as the package `__init__.py` files above: after unfreezing, re-apply the `ListenV2CloseStreamType` re-export plus any genuine new entries Fern added.

### Prepare repo for regeneration

Expand Down
Loading
Loading