Skip to content

fix: disable global history, add health checks, passthrough cache config#40

Merged
isaacbmiller merged 1 commit intomainfrom
isaac/perf-misc-fixes
Feb 28, 2026
Merged

fix: disable global history, add health checks, passthrough cache config#40
isaacbmiller merged 1 commit intomainfrom
isaac/perf-misc-fixes

Conversation

@isaacbmiller
Copy link
Copy Markdown
Contributor

Split from #38 (1/5)

Changes

  • Disable dspy.settings global history -- it's an unprotected plain list that races under concurrent requests. Inference logs capture everything we need.
  • Add /health/live and /health/ready endpoints -- standard container health probes. Ready returns 503 until all LMs are initialized.
  • Passthrough cache config -- the cache option in dspy.config.yaml was silently ignored when creating LM instances.

Files changed

  • src/dspy_cli/server/app.py (26 insertions, 5 deletions)

Testing

All 123 existing tests pass.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 984b4c7252

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dspy_cli/server/app.py
- Disable dspy.settings global history (not thread-safe under concurrency)
- Add /health/live and /health/ready endpoints for container probes
- Add health probe paths to DEFAULT_OPEN_PATHS so they work with --auth
- Passthrough 'cache' config option to dspy.LM constructor

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@isaacbmiller isaacbmiller merged commit 741ea52 into main Feb 28, 2026
1 check passed
@isaacbmiller isaacbmiller deleted the isaac/perf-misc-fixes branch February 28, 2026 21:18
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.

1 participant