Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ class DeepSeekOCRConfig(BaseSettings):
default="https://api.siliconflow.cn/v1",
description="DeepSeek-OCR API Base URL"
)
model: str = Field(
default="deepseek-ai/DeepSeek-OCR",
description="DeepSeek-OCR Model Name"
)
model: str = Field(..., description="DeepSeek-OCR Model Name")
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the model field required creates an inconsistency with other configuration classes in this codebase. LLMConfig (line 24), EmbeddingConfig (line 46-49), and RerankConfig (line 74-77) all provide default values for their model fields.

This inconsistency means that:

  1. Users must explicitly set DS_OCR_MODEL or the application will fail to start
  2. Other services can start with sensible defaults even if their model env vars are missing
  3. The configuration pattern is not uniform across the codebase

Consider either:

  • Keeping the default value to maintain consistency with other configs
  • Or updating all other config classes to also require explicit model specification (if that's the desired pattern)
Suggested change
model: str = Field(..., description="DeepSeek-OCR Model Name")
model: str = Field(default="deepseek-ocr-base", description="DeepSeek-OCR Model Name")

Copilot uses AI. Check for mistakes.

# OCR 模式配置
default_mode: str = Field(
Expand Down