Summary
The only two model IDs the SDK suggests for the aws_bedrock think provider are Claude 3.5 IDs unavailable in us-east-2, and the Union with Any means autocomplete offers them while accepting anything.
What happened?
Actual: deepgram/types/aws_bedrock_think_provider_model.py in 7.6.0 reads:
# This file was auto-generated by Fern from our API Definition.
import typing
AwsBedrockThinkProviderModel = typing.Union[
typing.Literal["anthropic/claude-3-5-sonnet-20240620-v1:0", "anthropic/claude-3-5-haiku-20240307-v1:0"], typing.Any
]
Two problems:
-
Neither listed ID is available in us-east-2, the region used throughout the Bedrock docs and examples. The only two IDs the SDK suggests are ones that fail in the default region — so the single discoverable starting point for this provider is a dead end.
-
Union[Literal[...], Any] collapses to Any for type-checking purposes. The literals are pure autocomplete decoration: they neither constrain input nor flag a wrong value. A user gets suggestions that don't work, and no protection when they type something that also doesn't work.
Expected:
- The suggested IDs should be ones that actually resolve in the documented default region, or the literals should be dropped in favour of a plain
str so nothing misleading is suggested.
- If the intent is BYO (any model string), say so —
str with a docstring pointing at the Bedrock model catalog is more honest than two broken literals.
This is a generated file. Per CONTRIBUTING.md — "this is a generated library, and changes to core files should be promoted to our generator code" — the fix likely belongs in the API definition the Fern generator reads, not in the checked-in file.
Steps to reproduce
pip install deepgram-sdk==7.6.0
- Open an editor with a type checker (Pylance / pyright / mypy).
- Type a
ThinkSettingsV1Provider_AwsBedrock(...) call and inspect the completions offered for model.
- Observe the two
anthropic/claude-3-5-* IDs are the only suggestions.
- Use either against
bedrock-runtime in us-east-2 → the model is not available in that region.
- Note that passing any other string, including a nonexistent one, type-checks clean because of the
Any arm.
Minimal code sample
# Inspect the generated type directly — no network needed.
from deepgram.types.aws_bedrock_think_provider_model import AwsBedrockThinkProviderModel
print(AwsBedrockThinkProviderModel)
# typing.Union[typing.Literal['anthropic/claude-3-5-sonnet-20240620-v1:0',
# 'anthropic/claude-3-5-haiku-20240307-v1:0'], typing.Any]
from deepgram.types.think_settings_v1provider import ThinkSettingsV1Provider_AwsBedrock
# Both of these type-check identically clean — the Literal arm constrains nothing:
ThinkSettingsV1Provider_AwsBedrock(model="anthropic/claude-3-5-sonnet-20240620-v1:0") # suggested, unavailable in us-east-2
ThinkSettingsV1Provider_AwsBedrock(model="not-a-real-model-at-all") # accepted, no warning
Logs / traceback
No traceback — this is a static typing / developer-experience defect.
The generated definition is quoted in full above.
Environment
| Field |
Value |
| Transport |
WebSocket |
| API endpoint / path |
/v1/agent/converse |
| Model(s) used |
anthropic/claude-3-5-sonnet-20240620-v1:0, anthropic/claude-3-5-haiku-20240307-v1:0 (the two suggested) |
| How often? |
Always |
| Is this a regression? |
Not known |
| SDK version |
7.6.0 |
| Python version |
3.13.14 |
| Install method |
pip |
| OS |
macOS (Apple Silicon) |
Verified against a clean deepgram-sdk 7.6.0 install (current on PyPI at time of filing) under Python 3.13.14. The quoted file contents are verbatim from the installed package.
Related: #759 — the Any fallback described here is what leaves a user free to select a Bedrock reasoning model that then fails silently.
Summary
The only two model IDs the SDK suggests for the
aws_bedrockthink provider are Claude 3.5 IDs unavailable inus-east-2, and theUnionwithAnymeans autocomplete offers them while accepting anything.What happened?
Actual:
deepgram/types/aws_bedrock_think_provider_model.pyin 7.6.0 reads:Two problems:
Neither listed ID is available in
us-east-2, the region used throughout the Bedrock docs and examples. The only two IDs the SDK suggests are ones that fail in the default region — so the single discoverable starting point for this provider is a dead end.Union[Literal[...], Any]collapses toAnyfor type-checking purposes. The literals are pure autocomplete decoration: they neither constrain input nor flag a wrong value. A user gets suggestions that don't work, and no protection when they type something that also doesn't work.Expected:
strso nothing misleading is suggested.strwith a docstring pointing at the Bedrock model catalog is more honest than two broken literals.This is a generated file. Per
CONTRIBUTING.md— "this is a generated library, and changes to core files should be promoted to our generator code" — the fix likely belongs in the API definition the Fern generator reads, not in the checked-in file.Steps to reproduce
pip install deepgram-sdk==7.6.0ThinkSettingsV1Provider_AwsBedrock(...)call and inspect the completions offered formodel.anthropic/claude-3-5-*IDs are the only suggestions.bedrock-runtimeinus-east-2→ the model is not available in that region.Anyarm.Minimal code sample
Logs / traceback
Environment
/v1/agent/converseanthropic/claude-3-5-sonnet-20240620-v1:0,anthropic/claude-3-5-haiku-20240307-v1:0(the two suggested)7.6.03.13.14Verified against a clean
deepgram-sdk7.6.0 install (current on PyPI at time of filing) under Python 3.13.14. The quoted file contents are verbatim from the installed package.Related: #759 — the
Anyfallback described here is what leaves a user free to select a Bedrock reasoning model that then fails silently.