Skip to content

feat(agent): add Deepgram Think provider - #821

Open
GregHolmes wants to merge 11 commits into
mainfrom
gh/sdk-gen-2026-10-29
Open

GregHolmes wants to merge 11 commits into
mainfrom
gh/sdk-gen-2026-10-29

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Feature

Adds the Deepgram Think provider for Voice Agent settings. Existing provider configurations continue to compile and run unchanged. Release Please should cut the next release as a minor version.

Regeneration

Regenerated the Python SDK with fern-python-sdk 5.27.1 from deepgram-docs PR #1329.

  • Corrected the Deepgram Think provider type collision and added typed sync/async serialization and union-parsing coverage.
  • Added a runnable example and a manual SettingsApplied integration test.
  • Reapplied all existing compatibility, transport, redaction, query-encoding, coverage, and whitespace patches.

Validation

  • pytest with branch coverage: 1137 passed, 4 skipped
  • mypy src/ and tests/typecheck
  • Ruff on reconciled files
  • poetry check
  • Live Deepgram Think validation for phonellm-mini-alpha-2-fp8 and think-fast

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
src.deepgram 97% 94% 0 ✔
src.deepgram.agent 100% 100% 0 ✔
src.deepgram.agent.v1 98% 100% 0 ✔
src.deepgram.agent.v1.settings 100% 100% 0 ✔
src.deepgram.agent.v1.settings.think 100% 100% 0 ✔
src.deepgram.agent.v1.settings.think.models 97% 100% 0 ✔
src.deepgram.auth 100% 100% 0 ✔
src.deepgram.auth.v1 100% 100% 0 ✔
src.deepgram.auth.v1.tokens 97% 100% 0 ✔
src.deepgram.core 88% 81% 0 ➖
src.deepgram.errors 100% 100% 0 ✔
src.deepgram.helpers 98% 92% 0 ✔
src.deepgram.listen 100% 100% 0 ✔
src.deepgram.listen.v1 98% 93% 0 ✔
src.deepgram.listen.v1.media 97% 100% 0 ✔
src.deepgram.listen.v2 98% 93% 0 ✔
src.deepgram.manage 100% 100% 0 ✔
src.deepgram.manage.v1 100% 100% 0 ✔
src.deepgram.manage.v1.models 96% 100% 0 ✔
src.deepgram.manage.v1.projects 97% 100% 0 ✔
src.deepgram.manage.v1.projects.billing 100% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.balances 96% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.breakdown 97% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.fields 97% 100% 0 ✔
src.deepgram.manage.v1.projects.billing.purchases 97% 100% 0 ✔
src.deepgram.manage.v1.projects.keys 96% 100% 0 ✔
src.deepgram.manage.v1.projects.members 97% 100% 0 ✔
src.deepgram.manage.v1.projects.members.invites 96% 100% 0 ✔
src.deepgram.manage.v1.projects.members.scopes 96% 100% 0 ✔
src.deepgram.manage.v1.projects.models 96% 100% 0 ✔
src.deepgram.manage.v1.projects.usage 98% 100% 0 ✔
src.deepgram.manage.v1.projects.usage.breakdown 97% 100% 0 ✔
src.deepgram.manage.v1.projects.usage.fields 97% 100% 0 ✔
src.deepgram.read 100% 100% 0 ✔
src.deepgram.read.v1 100% 100% 0 ✔
src.deepgram.read.v1.text 98% 100% 0 ✔
src.deepgram.self_hosted 100% 100% 0 ✔
src.deepgram.self_hosted.v1 100% 100% 0 ✔
src.deepgram.self_hosted.v1.distribution_credentials 96% 100% 0 ✔
src.deepgram.speak 100% 100% 0 ✔
src.deepgram.speak.v1 98% 97% 0 ✔
src.deepgram.speak.v1.audio 91% 80% 0 ✔
src.deepgram.speak.v2 98% 93% 0 ✔
src.deepgram.speak.v2.audio 100% 100% 0 ✔
src.deepgram.voice_agent 100% 100% 0 ✔
src.deepgram.voice_agent.configurations 95% 100% 0 ✔
src.deepgram.voice_agent.variables 95% 100% 0 ✔
Summary 95% (6572 / 6889) 91% (1438 / 1574) 0 ✔

Scope: hand-maintained SDK logic. Fern-generated data models (types/, requests/), package __init__.py files, version.py, and the unused core/http_sse/ scaffolding are excluded — see .coveragerc. Unscoped whole-package coverage is ~70%.

@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-10-29 feat(agent): add Deepgram Think provider Oct 29, 2026

@dg-coreylweathers dg-coreylweathers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Approving the content, but please hold the merge until docs #1335 and #1329 land on main. If a regen runs from docs main before that, deepgram_reasoning_mode.py gets deleted while the frozen provider file still imports it, and import deepgram breaks.

What I checked:

  • Speak types: untouched. The regen flipped Speak expressivity to int, and the patch commit put StrictInt back.
  • Parsing: open_ai / anthropic / google / groq / aws_bedrock think payloads still parse to their own classes. deepgram think goes to the new class, and deepgram speak (with or without speed) stays Speak. Sync and async send the same JSON, including a fallback think list.
  • Patches: all still there. .fernignore only adds lines, and none of the socket/transport/redaction/query files changed.
  • Tests in Docker: 1137 passed, 4 skipped. mypy src + typecheck clean.
  • Live against prod: phonellm-mini-alpha-2-fp8 gets SettingsApplied with mip_opt_out true and false. think-fast gets SettingsApplied (VOICE_PROMPT_ADDED warning unless voice_prompt_opt_out is set). think-fast with mip_opt_out true gets INVALID_SETTINGS, like the example comment says. Plain phonellm-mini-alpha-2 gets "model not available", so -fp8 is the right ID. Example 34 and the manual script both run clean.

One thing I'd fix before merge:

  • The .fernignore freeze covers the whole think provider file, so OpenAI/Anthropic/etc. think updates stop reaching Python until it's removed. Once #1335 is on main, can you regen from it and drop those two lines? The generated enum will also become DeepgramThinkProviderReasoningMode, same as Java.

Small stuff:

  • examples/README.md: add 34 under 33.
  • examples/34 line 40 (and the manual script line 44): voice_prompt_opt_out only matters for think-fast, so it does nothing here. Drop it or add a comment.
  • .fern/metadata.json says the regen came from a dirty docs tree. Can you note what was local?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants