feat: v0.8.0 — pais repro harness + drop SDK-owned chat defaults - #26
Merged
Merged
Conversation
Two changes in one release. 1) New `pais repro` command — one-shot, non-interactive harness that builds a fresh KB+index+agent from supplied fixtures (test-suites dir, instructions md, prompt files), runs every prompt against the agent, and bundles per-prompt metrics + doctor snapshot + chat-error JSONs + log into a single zip suitable for support hand-off and regression archival. Captures prompt_tokens, completion_tokens, finish_reason, latency, full response text, and request_id per turn. 2) Drop SDK-owned defaults from ChatCompletionRequest — max_tokens and temperature default to None (was 500 and 0.7), so model_dump's exclude_none drops them and the server picks. Same v0.7.4 pattern. New tests/test_chat_request_wire_shape.py pins the body shape. Tests: 413 passed (+6 new). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Two changes in one release:
1. New
pais reprocommand — reproducible chat-experiment harnessOne-shot, non-interactive command that stands up a fresh KB + index + agent from supplied fixtures, ingests the test-suites dir, runs each supplied prompt, and bundles everything into a single zip for hand-off / regression archival.
```bash
pais repro \
--suites-dir ./test-suites/ \
--instructions ./instructions.md \
--prompts ./prompts/per-pr/p20242.md \
--prompts ./prompts/combined.md \
--max-tokens 2048 \
--output /tmp/pais-repro.zip
```
Bundle layout: `manifest.json` (full recipe + KB/index/agent ids), `responses/.json` (per-prompt: prompt_tokens, completion_tokens, finish_reason, latency_ms, response_text, errors), `doctor.md`, `chat-errors/*.json`, `pais.log`.
Side-by-side comparison across prompts makes scaffolding-vs-tokenizer-vs-RAG diagnosis trivial.
`--cleanup` deletes the agent + KB after bundling (off by default). `--include-instructions` opts the instructions text into the bundle (off by default; only its byte length + SHA-256 land in the manifest otherwise).
2.⚠️ Behavior change — drop SDK-owned chat defaults
`ChatCompletionRequest.max_tokens` default changed from `500` to `None`; `temperature` from `0.7` to `None`. Same v0.7.4 pattern: `model_dump(exclude_none=True)` drops `None` but not numeric defaults, so the SDK was silently sending `max_tokens=500` on every chat request → `finish_reason=length` even when the user expected the full output.
To restore the previous behavior in your code, pass values explicitly: `ChatCompletionRequest(messages=[…], max_tokens=500, temperature=0.7)`.
Test plan
🤖 Generated with Claude Code