Skip to content

Improve error message when DEEPSEEK_API_KEY is not set #4

@withAIx

Description

@withAIx

What

Replace the current generic ValueError("DEEPSEEK_API_KEY 未设置...") with a more helpful message that guides the user to the solution.

Current Behavior

When the API key is missing, the user sees:

ValueError: DeepSeek API Key 未设置。请设置环境变量 DEEPSEEK_API_KEY 或传入 api_key 参数

Desired Behavior

The error message should include:

  1. A link to the .env.example file for reference
  2. A copy-pasteable export command
  3. A link to the DeepSeek API key page

Example:

DeepSeek API Key not found.

To fix this:
  1. Copy .env.example to .env: cp .env.example .env
  2. Add your key to .env: DEEPSEEK_API_KEY=sk-your-key-here
  3. Or export it: export DEEPSEEK_API_KEY=sk-your-key-here

Get a key at: https://platform.deepseek.com/api_keys

Where

  • src/agents/_base.pyBaseAgent.client property
  • project-orchestrator/worker.py_get_client() function
  • project-orchestrator/orchestrator.py_get_client() function

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions