Summary
Agent configuration/resilience items, batched together.
Items
- Model name duplicated as string literals in six places:
MODEL = 'gpt-5.5' is independently declared in all four agent files (riskAgent.ts, careGapAgent.ts, sdohAgent.ts, actionPlannerAgent.ts), and scripts/eval.ts hardcodes 'gpt-5.5' twice (lines 556, 719) even though routes/analysis.ts:15 imports MODEL. Changing the model in one agent leaves the other three on the old model, and computeCostUsd returns null for unknown models — costs render as "—" while agents actually run on a different model.
- No retry or timeout on the LLM call (
riskAgent.ts:284-289 and the other three agents): a single client.responses.create; a transient 429/500 fails the whole run.
- Fallback doesn't match its own documentation: the
streamMockRisk doc comment (riskAgent.ts:204-206) claims the fallback activates when "quota is exhausted", but the code (line 277) only checks process.env.OPENAI_API_KEY presence — a quota-exhausted key throws rather than falling back.
Summary
Agent configuration/resilience items, batched together.
Items
MODEL = 'gpt-5.5'is independently declared in all four agent files (riskAgent.ts,careGapAgent.ts,sdohAgent.ts,actionPlannerAgent.ts), andscripts/eval.tshardcodes'gpt-5.5'twice (lines 556, 719) even thoughroutes/analysis.ts:15importsMODEL. Changing the model in one agent leaves the other three on the old model, andcomputeCostUsdreturnsnullfor unknown models — costs render as "—" while agents actually run on a different model.riskAgent.ts:284-289and the other three agents): a singleclient.responses.create; a transient 429/500 fails the whole run.streamMockRiskdoc comment (riskAgent.ts:204-206) claims the fallback activates when "quota is exhausted", but the code (line 277) only checksprocess.env.OPENAI_API_KEYpresence — a quota-exhausted key throws rather than falling back.