Repository navigation
feat(regen): add deepgram think provider types - #823
Conversation
|
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Thanks @GregHolmes. This is the regen we wanted. One small fix and I'll approve.
Merge order: this needs to land before release PR #822. DeepgramReasoningMode never shipped (7.16.0 on PyPI doesn't have it), but #822 would ship it in 7.17.0 if it merges first, and then this PR becomes a breaking rename.
What I checked (Docker):
- Freeze lines are gone, both
think_settings_v1provider.pyfiles are generator-owned, every other.fernignorepatch is intact, andimport deepgramworks.DeepgramReasoningModeis gone everywhere. - 1138 passed / 4 skipped, mypy src + typecheck clean, ruff clean on changed files.
- Python 3.10-3.14 x pydantic 2.14 and 1.10: think
deepgramparses to the think variant and speakdeepgramto speak, under both. Wheel is clean. - Live prod: think-fast and phonellm-mini-alpha-2-fp8 get SettingsApplied, all five reasoning modes apply on phonellm, and think-fast +
mip_opt_out: truegets INVALID_SETTINGS as documented.
Should-fix:
tests/custom/test_agent_think_live.py:242,test_direct_deepgram_think_provider_serializesfails on pydantic 1.10. Under v1,.json()(exclude_unset=True) drops the defaultedtype: "deepgram". CI only runs v2, so it's green. The SDK itself is fine, since the sockets send.dict(). Assert onprovider.dict()instead.
Nits:
- Standalone
DeepgramThinkProvidercan't be passed toThinkSettingsV1(provider=...)(ValidationError). Callers wantThinkSettingsV1Provider_Deepgram. A docstring line pointing there would save someone a confused afternoon. - Separate from this PR:
AgentV1Settings(mip_opt_out=None)sends"mip_opt_out": null, and prod answers UNPARSABLE_CLIENT_MESSAGE.
Under pydantic v1, .json() in UniversalBaseModel uses exclude_unset=True, so the defaulted `type: "deepgram"` is dropped and the old assertion failed. Both agent sockets send data.dict(), which keeps `type`, so assert on dict() to match the real payload on v1 and v2.
|
Hey Greg, I pushed a small test fix to this branch.
No library changes, the SDK was never affected. |
dg-coreylweathers
left a comment
There was a problem hiding this comment.
Approving with the test fix in (85b2387). Everything else from my earlier review holds: the freeze lines are gone, import deepgram works, the suite is green on pydantic 2 and the think tests pass on 1.10, and the live prod checks all behave as documented.
Merge order: please land this before release PR #822. DeepgramReasoningMode never shipped, but #822 would ship it in 7.17.0 if it merges first.
Summary
DeepgramReasoningModename.Validation
poetry run pytest -rP --cov=deepgram --cov-branch --cov-report=xml --cov-report=term-missing .- 1138 passed, 4 skippedpoetry run mypy src/poetry run mypy tests/typecheckpoetry run ruff check src/poetry run ruff check tests/custom/test_agent_think_live.py tests/typecheck/compat_aliases.pypoetry run ruff check .still reports existing formatting/import issues in examples and manual tests outside this regeneration.