Skip to content

feat: trace the remaining request parameters pi puts on the wire - #30

Merged
hassiebp merged 2 commits into
feat/model-parametersfrom
feat/model-parameters-extras
Sep 14, 2026
Merged

hassiebp merged 2 commits into
feat/model-parametersfrom
feat/model-parameters-extras

Conversation

@milanagm

@milanagm milanagm commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #29, base is feat/model-parameters, so this diff is only the additions.

Change

This PR adds the rest of what pi actually puts on the wire, each read off the request payload:

chip source why
thinking_budget_tokens payload the concrete budget the provider was given
prompt_cache_retention payload "24h" (OpenAI) / "1h" (Anthropic) — cost-relevant
service_tier payload cost-relevant, openai-responses only
tool_choice payload string, or the type of the object form
declared sampling params payload, keyed by model config temperature, top_p, top_k, min_p, …

Plus context_window in the generation metadata.

Tests

pnpm typecheck clean. pnpm test 87/87, up from 75 on #29.

End-to-end through the real pi CLI:

  • prompt_cache_retention: "24h" with compat.supportsLongCacheRetention in models.json and PI_CACHE_RETENTION=long
  • declared sampling parameters, asserting the values the wire carried rather than the configured ones
  • context_window on every generation

@milanagm
milanagm requested a review from hassiebp September 9, 2026 17:36
@hassiebp
hassiebp merged commit 1e34892 into feat/model-parameters Sep 14, 2026
11 checks passed
@hassiebp
hassiebp deleted the feat/model-parameters-extras branch September 14, 2026 15:16
milanagm added a commit that referenced this pull request Sep 15, 2026
* feat: trace the remaining request parameters pi puts on the wire

* test: assert sampling parameters against the wire, not the model config
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.

2 participants