Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

EMBEDDING_MODEL had a hardcoded default in src/config.py that duplicated configuration already defined in env.example and docker-compose.yml.

Changes

  • Changed EmbeddingConfig.model from optional with default to required field
  • Now consistent with api_key and base_url handling in the same class
# Before
model: str = Field(
    default="Qwen/Qwen3-Embedding-0.6B",
    description="Embedding Model Name"
)

# After
model: str = Field(..., description="Embedding Model Name")

Compatibility

Docker compose files already provide fallback defaults via ${EMBEDDING_MODEL:-Qwen/Qwen3-Embedding-0.6B}, so deployment behavior is unchanged.

Original prompt

This section details on the original issue you should resolve

<issue_title>Embedding model default hardcoded - should use env variable</issue_title>
<issue_description>## 问题描述
Embedding 模型默认值硬编码。

受影响的文件

  • src/config.py 行 47

硬编码值

  • default="Qwen/Qwen3-Embedding-0.6B"

问题

虽然有 EMBEDDING_MODEL 环境变量,但代码中也硬编码。

解决方案

应该移除硬编码的默认值或保持一致。</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: BukeLy <19304666+BukeLy@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove hardcoded default embedding model value Remove hardcoded EMBEDDING_MODEL default value Dec 15, 2025
Copilot AI requested a review from BukeLy December 15, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embedding model default hardcoded - should use env variable

2 participants