Skip to content

refactor(providers): add internal request config seam#59454

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
vincentkoc:fix/provider-request-policy-followup
Apr 2, 2026
Merged

refactor(providers): add internal request config seam#59454
vincentkoc merged 1 commit into
openclaw:mainfrom
vincentkoc:fix/provider-request-policy-followup

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • add an internal ResolvedProviderRequestConfig seam for provider request settings
  • route pi embedded model resolution through the shared request config merge path
  • keep future auth/proxy/tls request policy slots stable without changing public config yet

Testing

  • pnpm test -- src/agents/provider-request-config.test.ts src/agents/pi-embedded-runner/model.test.ts
  • pnpm check
  • pnpm build

Notes

  • this is phase 2 of the request-policy work: internal request-shaping structure, not new user-facing config.
  • auth/proxy/tls slots are internal placeholders for later rollout; current behavior is unchanged except the merge logic is centralized.

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Apr 2, 2026
@vincentkoc vincentkoc self-assigned this Apr 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Apr 2, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review April 2, 2026 05:25
@greptile-apps

greptile-apps Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR centralizes the scattered header-merge and transport-assembly logic from three sites in model.ts into a new resolveProviderRequestConfig helper, adding internal placeholder slots for future auth/proxy/TLS policy work. The refactor faithfully preserves existing behavior — api, baseUrl, and headers outputs at each call site are semantically equivalent to the expressions they replace.

Confidence Score: 5/5

  • Safe to merge; this is a pure behavioral-parity refactor with no functional changes to existing callers.
  • All three call sites produce identical api/baseUrl/headers values after the refactor. The mergeProviderRequestHeaders function is correct — sanitizeModelHeaders upstream ensures inputs are either undefined or non-empty, so the Object.keys guard is sound. Placeholder proxy/tls types are intentionally locked to false for now. No P0 or P1 findings.
  • No files require special attention.

Reviews (1): Last reviewed commit: "refactor(providers): add internal reques..." | Re-trigger Greptile

@vincentkoc
vincentkoc merged commit 1707493 into openclaw:main Apr 2, 2026
60 of 61 checks passed
steipete pushed a commit to duncanita/openclaw that referenced this pull request Apr 4, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Nachx639 pushed a commit to Nachx639/clawdbot that referenced this pull request Jun 17, 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 maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant