fix: expose Vertex headers in public model config types

Merged
SH
9mo ago
+21-1

Summary

  • expose headers on GoogleVertexProviderSettings in Stagehand public model types
  • add a public API type test proving model configs with headers are accepted for google/openai/anthropic
  • add a patch changeset

Context

Runtime already forwards provider options to createVertex(), but TypeScript rejected headers in model config. This aligns public types with runtime behavior.

Validation

  • pnpm -C packages/core run typecheck
  • pnpm -C packages/core run build:esm
  • pnpm -C packages/core run test:core -- packages/core/dist/esm/tests/unit/public-api/llm-and-agents.test.js
  • pnpm -C packages/core run test:core -- packages/core/dist/esm/tests/unit/llm-provider.test.js

Summary by cubic

Expose the headers field on GoogleVertexProviderSettings in the public model config types so custom provider headers (e.g., X-Goog-Priority) are accepted without TypeScript errors. Updated the public API type test to cover Vertex headers and align the model config check with the public API style, keeping types consistent with runtime behavior.