Skip to content

Agent config roundup: 'gpt-5.5' duplicated in six places, no retry/timeout on LLM calls, mock fallback doesn't cover quota exhaustion #56

Description

@manjula25

Summary

Agent configuration/resilience items, batched together.

Items

  1. 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.
  2. 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.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions