feat(examples): add results caching and modernize example runner#53
Merged
richardsolomou merged 3 commits intomainfrom Apr 3, 2026
Merged
Conversation
Add all new provider API keys to .env.example and update run-examples.sh to use uv run for Python examples with pyproject.toml instead of the old requirements.txt-based install.
Cache SHA-256 hashes of example files in .results/ on success. Subsequent runs skip examples whose source hasn't changed, avoiding unnecessary API costs across 90+ examples. Use --rerun to force, --reset to clear cache. Also removes example targets from Makefile (run-examples.sh is the single entry point), updates docs to reference phrocs, and pins litellm to 1.81.13. Generated-By: PostHog Code Task-Id: 81d969ea-b442-458b-a80c-9da48cc3195c
Batch-compute file hashes in a single shasum call (13s → 0.6s) and add a PostHog-branded info tab as the first phrocs panel showing run summary and available commands. Generated-By: PostHog Code Task-Id: 81d969ea-b442-458b-a80c-9da48cc3195c
Radu-Raicea
approved these changes
Apr 3, 2026
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.
Problem
Running 90+ provider examples incurs API costs on every run, even when nothing has changed. The example runner also referenced mprocs (removed), had Makefile targets that duplicated the shell script, and the
.env.exampleonly covered 3 providers.Changes
run-examples.sh): Cache SHA-256 hashes of example source files in.results/on success. Subsequent runs skip examples whose source hasn't changed. Works in both sequential (--all) and parallel (--parallel) modes. New flags:--rerun— ignore cache, force re-run (combinable with other flags)--reset— clear the cache--listnow shows✓next to cached examples with a count summaryexamples-*targets —run-examples.shis the single entry point.env.example: Add API key placeholders for 14 new providers (Groq, DeepSeek, Mistral, Azure, Bedrock, etc.)README.md,CLAUDE.md): Update commands to reference./run-examples.shdirectly, mention phrocsuv.lock: Pin litellm to 1.81.13How did you test this code?
bash -n run-examples.sh— no syntax errors./run-examples.sh --list— discovers all 91 examples, shows cache status./run-examples.sh --reset— clears cache correctly