DeepSeek Provider
Updated 19 days ago • May 3, 2026
@kortyx/deepseek is the DeepSeek provider package for Kortyx.
It gives you two entry points:
deepseek: a batteries-included default provider selectorcreateDeepSeek(...): an explicit factory for custom setup
1. Install the package
2. What the package exports
What each export is for:
deepseek: default provider selector for the fastest startcreateDeepSeek(...): custom provider instance with explicit settingsMODELS: built-in DeepSeek model ids exposed by the packagePROVIDER_ID: the provider id string, currently"deepseek"
3. Basic usage in the same file
deepseek is a provider selector, which means:
- it is callable:
deepseek("deepseek-chat") - it also exposes provider metadata:
deepseek.id,deepseek.models
Good to know: The built-in model list gives autocomplete, but arbitrary DeepSeek-compatible model ids are accepted as strings.
4. Shared app bootstrap usage
If you want one shared import path across your app, re-export deepseek from a bootstrap file such as src/lib/providers.ts.
Then import it from that file where you actually use it:
5. Advanced usage with explicit settings
Use createDeepSeek(...) when you want app-owned configuration instead of the default environment-based setup.
Use the factory when you need to:
- pass
apiKeyexplicitly - use a custom
baseUrl - provide a custom
fetch
6. Credentials and first-use behavior
The default deepseek export resolves credentials on first use, not at import time.
Supported environment variables:
DEEPSEEK_API_KEYKORTYX_DEEPSEEK_API_KEY
If neither variable is set and you did not pass apiKey to createDeepSeek(...), the provider throws a configuration error the first time a DeepSeek model is actually used.
7. Create model refs for workflow and node params
You can also attach default model options to the ref itself:
Those become default options for later useReason(...) calls unless you override them at call time.
8. Use the model with useReason(...)
Good to know: Provider setup is not done on
createAgent(...). Model selection happens where you calluseReason(...)by passing a model ref.
9. Supported normalized call options
DeepSeek currently maps these generic Kortyx options:
temperaturestreamingmaxOutputTokensstopSequencesabortSignalreasoning.effortreasoning.maxTokensresponseFormat.type
Current DeepSeek provider options:
providerOptions.deepseek.thinking
Current mapping details:
responseFormat.type: "json"maps to DeepSeek JSON object modereasoning.effortandreasoning.maxTokensmap to enabling or disabling provider thinkingtemperaturedefaults to0.7when you do not set it
Current warning-backed gaps:
responseFormat.schemais not sent as a native provider schema; it is included in instructions- DeepSeek does not expose a generic reasoning token budget through this provider
- unknown
providerOptionskeys are ignored and reported inresult.warnings
10. Normalized metadata you get back
DeepSeek returns the normalized Kortyx result fields when the API provides them:
usagefinishReasonproviderMetadatawarningsraw
DeepSeek-specific metadata currently includes fields such as:
providerIdmodelIdresponseIdresponseModelcreatedusagepromptCacheHitTokenspromptCacheMissTokens
Use providerMetadata when you need debugging or observability details without coupling your app code to the raw provider payload shape.
Supported scope
@kortyx/deepseek currently supports text generation through DeepSeek chat completions via useReason(...), including streaming and non-streaming invocation.
It does not currently expose embeddings, image generation, file APIs, or provider-hosted tools. Check result.warnings when you rely on advanced generic options and want to verify how DeepSeek handled them.
Available built-in DeepSeek model ids
deepseek-chatdeepseek-reasoner
Next steps
- See Hooks for
useReason(...)behavior and structured output - See Provider API for the shared normalized provider contract