Fix model name mismatch between sample.env and Bicep + add validation#34
Conversation
sample.env referenced gpt-4o and text-embedding-ada-002 with API key auth, but infra/main.bicep deploys gpt-4.1-mini and text-embedding-3-small with passwordless auth. This caused confusion for local dev users. Changes: - sample.env: Update model names and API versions to match Bicep defaults - sample.env: Add SET_PASSWORDLESS=true to match Bicep deployment - llm.ts: Update fallback model from gpt-4o to gpt-4.1-mini - llm.ts: Update fallback API version from 2024-10-21 to 2025-01-01-preview - Add scripts/validate-config.mjs to detect sample.env vs Bicep drift - Add .github/workflows/validate-config.yml to run validation on PRs - Add npm run validate:config script Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The 'Validate Config Consistency' workflow referenced scripts/validate-config.js but the actual file is scripts/validate-config.mjs (ES module). Updated the workflow run command and the script's inline comment to use the correct .mjs extension. Fixes the 'Cannot find module' CI failure on PR #34. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- LLM model: gpt-4o -> gpt-4.1-mini (matches Bicep deployment) - maxTokens default: 100 -> 1000 (matches sample.env) - Embedding model: text-embedding-ada-002 -> text-embedding-3-small (matches Bicep) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…and sample.env Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❌ Reviewed by Piggy (Quality Reviewer) — REJECTED (needs 1 fix) SummaryGood intent — fixes real config drift and adds CI guard. But the PR introduces a new inconsistency it should have caught, and the validation script has coverage gaps. 🔴 Blocking Issue (1)API version fallback missed in packages/langgraph-agent/src/config/llm.ts
Fix: Change 🟡 Non-Blocking Improvements (2)1. Validation script only checks packages-v1/ source filesThe CONFIG_CHECKS array points sourceFile only to
The blocking bug above proves this gap — the script would pass while drift exists. 2. CI workflow path triggers missing packages/ paths
✅ What's Correct
Pre-existing (not blocking)
|
- Fix packages/langgraph-agent/src/config/llm.ts API version fallback from '2024-10-21' to '2025-01-01-preview' to match sample.env, Bicep, and packages-v1/ - Update scripts/validate-config.mjs to scan both packages-v1/ and packages/ source files for config consistency - Add packages/**/config/*.ts to CI workflow trigger paths Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Piggy (Quality Reviewer) — ✅ Approved on re-review All 3 previously identified issues verified fixed:
|
|
Kermit (Lead) — ✅ Approved Verdict: This PR directly solves a real developer trap — the three-way config mismatch between sample.env, Bicep, and source fallbacks would cause runtime errors for anyone following the setup guide. Review by area:
Non-blocking observations for follow-up:
|
|
Gonzo (Tech Researcher) — ✅ Approved Review scope: Model names, API versions, Bicep correctness, SDK compatibility, validation script logic. 1. Model name — gpt-4.1-mini ✅ 2. API version — 2025-01-01-preview ✅ (with note) 3. Bicep resources ✅
4. SDK compatibility ✅ 5. Embedding model update ✅ 6. maxTokens fix ✅ 7. Validation script ✅
8. CI workflow ✅ Pre-existing issue (not introduced by this PR): |
|
Donna (Tester) — ✅ Approved Test Results1. Validation Script (scripts/validate-config.mjs)
2. Edge Cases
3. CI Workflow
4. Build Verification
5. Regression Risk Assessment
SummaryAll config values are consistent across sample.env ↔ Bicep ↔ source fallbacks. Validation script works correctly for its intended purpose. Build is clean. Minor suggestion: add try-catch around primary file reads for friendlier CI error messages, but not blocking. |
Problem
\sample.env\ referenced outdated models (\gpt-4o, \ ext-embedding-ada-002) and API versions (\2024-10-21), while \infra/main.bicep\ deploys \gpt-4.1-mini\ and \ ext-embedding-3-small\ with API version \2025-01-01-preview. The source code fallback defaults in \llm.ts\ also used the stale values. This three-way inconsistency would confuse developers doing local setup.
Additionally, \sample.env\ had no \SET_PASSWORDLESS\ variable even though Bicep deploys with managed identity auth.
Changes
Config fixes
Drift prevention (new)
pm run validate:config**: npm script for local use.
How it prevents future drift
If someone changes the model in Bicep but forgets to update \sample.env\ (or vice versa), CI will fail with a clear error showing which values are out of sync.