models: Add support for DeepSeek models #428
Open
+589
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Features
Changes
src/strands/models/deepseek.py
: New DeepSeek model provider implementation with proper tool use streamingsrc/strands/models/__init__.py
: Export DeepSeekModel classtests_integ/models/test_model_deepseek.py
: Comprehensive integration tests (8 test cases)tests_integ/models/ds_test.py
: Demonstration script showing tool use capabilitiesREADME.md
: Update documentation with DeepSeek examples and provider listUsage
Testing
✅ All 8 integration tests passing
✅ Basic conversation, structured output, streaming, tool usage
✅ Multi-tool workflows (calculator, file_read, shell)
✅ Configuration updates and async operations
✅ Tool use streaming matches OpenAI/Ollama implementations
✅ All mypy type checks passing
Documentation PR
strands-agents/docs#135
Type of Change
New feature
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
I ran
hatch run prepare
Checklist
[x] I have read the CONTRIBUTING document
[x] I have added any necessary tests that prove my fix is effective or my feature works
[x] I have updated the documentation accordingly
[x] I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.