Skip to content

test: fix pi extra params responses model typing in regression test#29131

Closed
cfregly wants to merge 1 commit intoopenclaw:mainfrom
cfregly:fix-pi-responses-model-typing-upstream
Closed

test: fix pi extra params responses model typing in regression test#29131
cfregly wants to merge 1 commit intoopenclaw:mainfrom
cfregly:fix-pi-responses-model-typing-upstream

Conversation

@cfregly
Copy link

@cfregly cfregly commented Feb 27, 2026

Summary

  • fix TS2352 in src/agents/pi-embedded-runner-extraparams.test.ts for the supportsStore=false regression test
  • keep this change test-only and scoped to typing compatibility with Model<"openai-responses">

Why

The CI check job currently fails in pnpm tsgo because that test case casts an object literal that no longer overlaps enough with the newer Model<"openai-responses"> type shape.

Validation

  • pnpm format:check
  • pnpm tsgo
  • pnpm test -- src/agents/pi-embedded-runner-extraparams.test.ts

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

Fixes TypeScript compilation error (TS2352) in src/agents/pi-embedded-runner-extraparams.test.ts by adding missing required fields to a Model<"openai-responses"> mock object. The test was failing because the mock object with a compat field didn't sufficiently overlap with the expected type shape.

Changes:

  • Added name, reasoning, input, cost, contextWindow, and maxTokens fields to the mock object in the supportsStore=false regression test
  • All added fields align with ModelDefinitionConfig type requirements from src/config/types.models.ts
  • Change is test-only and doesn't affect production code

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a minimal, well-scoped TypeScript typing fix in a test file. It adds required fields to a mock object to satisfy type constraints without altering any test logic or production code. The fix follows existing patterns in the codebase and correctly addresses the TS2352 compilation error.
  • No files require special attention

Last reviewed commit: 2dc8e03

@cfregly
Copy link
Author

cfregly commented Feb 28, 2026

Superseded by #29244, which is rebased on current main and scoped to a single-line, single-file typing cleanup.

Closing this PR to keep review scope unambiguous.

@cfregly cfregly closed this Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant