DSPy: The framework for programming—not prompting—language models
DSPy 3.3.0 LM compatibility fixtures
These fixtures were generated by unchanged DSPy 3.3.0, commit
e4e97aae29b8ad8aa2fb7e99ffae6fd52970fad8. They are not generated by the
migration implementation. manifest.json records the Python/dependency
versions, calls, exact cache keys, synthetic provider responses, outputs,
and stable history/usage fields.
Each ZIP is a real diskcache directory written and closed by that DSPy version. It contains SQLite databases with pickled LiteLLM responses, not responses reserialized by the current implementation. Tests extract a copy into a temporary directory and read it through DSPy's normal LM call path. No credentials, personal prompts, or live model responses are included. Only load these trusted repository-owned archives: pickle is executable data.
Cases cover text, two rich answers (reasoning, tool calls, citations, logprobs), and reasoning-model token-parameter normalization, in sync and async forms. Sync and async keys differ in 3.3. On a cache hit the usage tracker stays empty, while history retains the response's original cost metadata; the fixtures capture that observed behavior, not a new billing policy.
Why these fixtures remain
These protect historical cache compatibility, not the removed experimental
3.3 request/response types. test_lm_migration_compatibility.py checks the recorded
outputs, cache keys, usage, and history. test_old_disk_cache_hits_before_native_routing
in test_lm_engine_execution.py also reads all six archives with the default engine
selection and forbids engine construction on a cache hit.
Keep the archives, manifest, and generator while maintaining that compatibility promise. Replacing their contents with lm15 responses would stop testing whether actual old cache files can be read. The generator is the reproducible record of how they were made, not a script to run during the 3.5 interface migration. Removing legacy LM interfaces does not by itself justify dropping old-cache coverage.
Regeneration (deliberate, never automatic during tests)
Create a clean checkout at the exact commit above.
Install that checkout with the dependency versions in
manifest.json.From the old checkout, run the generator from this directory:
python /absolute/path/to/generate.py /tmp/lm-3.3-fixturesReview JSON and archive differences before replacing fixtures. Do not refresh expected values merely to make migration tests pass.
generate.py verifies the checkout commit and imports DSPy from that checkout.
Only LiteLLM's network completion function is replaced with synthetic data;
DSPy's normalization, cache key generation, cache serialization, output
processing, usage accounting and history recording execute unchanged.
Scope
These are migration tripwires, not a snapshot of every private method. The primary checks exercise public calls. Adapt the synthetic backend seam as engine integration evolves, not the recorded expectations. The key check intentionally inspects the cache: exact old-key compatibility is itself the requirement.
The six archives occupy about 140 KiB. We keep full closed cache directories rather than invent a portable pickle wrapper, to test the actual old disk format. This pins one recorded dependency environment, not every historical LiteLLM version. Time stamps and random IDs are checked for presence but not compared with recorded values.
Existing test_lm.py, test_disk_serialization.py and tests/streaming/ retain
coverage for errors, copy/save/load, serialization safety, and streaming.
Text-completion and Responses-API historical disk fixtures, multimodal input
variants, and arbitrary provider-specific parameters are not covered by this
small first set. They need targeted additions if integration touches those paths.