Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
…oyment identifier Resolves #8 Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
Allow ProductionConfigService to read AZURE_OPENAI_DEPLOYMENT_ID and override the AI model deployment name from environment variables. Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
81be012 to
aa66b81
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor Azure OpenAI Configuration - Issue #8 工作報告
任務:移除
deployment_id欄位,改用model作為 Azure OpenAI 部署識別符。類型:Refactor
狀態:已完成
一、任務概述
為簡化 AI 配置邏輯,統一各 AI 提供商的設定結構,需完全移除 Azure OpenAI 的
deployment_id欄位,並改由model欄位直接存放部署名稱。此變更不考慮向後相容性。二、實作內容
2.1 移除
deployment_id欄位AIConfig結構與預設值中的deployment_id【F:src/config/mod.rs†L157-L162】【F:src/config/mod.rs†L184-L185】deployment_id的邏輯【F:src/config/service.rs†L287-L295】【F:src/config/service.rs†L359-L364】2.2 更新 AzureOpenAIClient
deployment_id欄位與參數【F:src/services/ai/azure_openai.rs†L21-L29】【F:src/services/ai/azure_openai.rs†L33-L44】from_config中以model作為部署識別符,新增空值檢查【F:src/services/ai/azure_openai.rs†L61-L69】【F:src/services/ai/azure_openai.rs†L72-L80】self.model【F:src/services/ai/azure_openai.rs†L171-L175】2.3 更新驗證與欄位檢查
validator中對deployment_id的驗證邏輯【F:src/config/validator.rs†L101-L115】ai.deployment_id條目【F:src/config/field_validator.rs†L81-L89】【F:src/config/field_validator.rs†L208-L212】2.4 更新測試與示例
deployment_id並加入api_version【F:src/services/ai/openai.rs†L146-L149】【F:src/services/ai/openai.rs†L168-L171】【F:src/services/ai/openrouter.rs†L516-L519】model驗證 Azure 部署名稱【F:src/config/validator.rs†L333-L340】2.5 更新文件範例
deployment_id,改以model作為部署識別符【F:docs/configuration-guide.md†L70-L81】【F:README.md†L74-L82】【F:README.zh-TW.md†L69-L75】三、測試與驗證
cargo fmt -- --check cargo clippy -- -D warnings cargo test四、影響評估
向後相容性:刪除 legacy 欄位,不保持向後相容。使用者需將
deployment_id值移至model。Resolves #8