trading_agent.doctor.checks.deepseek_backend_check
¶
Checks that a DeepSeek backend has its API key and that DeepSeek accepts it.
The key is never shown. The check lists DeepSeek's models, a request that costs nothing.
Typical usage example:
result = DeepSeekBackendCheck('deepseek', backend_configuration, secrets).run()
DeepSeekBackendCheck
¶
Bases: DoctorCheck
Checks one backend of kind "deepseek".
Creates the check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend_name
|
str
|
The backend's name in trading_agent.toml. |
required |
backend_configuration
|
BackendConfiguration
|
Its settings. |
required |
secrets
|
Secrets
|
The secrets, holding the key. |
required |
Source code in src/trading_agent/doctor/checks/deepseek_backend_check.py
run
¶
Checks the key is set, then that DeepSeek answers with it.
Returns:
| Type | Description |
|---|---|
CheckResult
|
OK when DeepSeek accepts the key, failed when the key is missing or refused or DeepSeek cannot be reached. |