Skip to content

fix: validate configuration whitespace - #25

Merged
tensornull merged 2 commits into
mainfrom
fix/config-whitespace-validation
Jul 29, 2026
Merged

fix: validate configuration whitespace#25
tensornull merged 2 commits into
mainfrom
fix/config-whitespace-validation

Conversation

@tensornull

Copy link
Copy Markdown
Contributor

Summary

  • reject explicit blank API keys and base URLs without falling back
  • normalize direct and environment string configuration while preserving callable keys and httpx.URL
  • keep inherited copy helpers fail-closed for provider and workload identity injection
  • allow normal stable 0.1.x Release Please manifests without reopening 0.2

Root cause

The configuration resolvers only distinguished None and empty strings. Whitespace-only values were truthy, so keys reached the OpenAI client unchanged and base URLs were parsed into encoded whitespace paths.

User impact

Explicit blank values now raise the official OpenAIError. Blank environment keys are missing, blank environment base URLs use the CometAPI default, and valid string values are trimmed without exposing credentials.

Validation

  • 290 non-live tests passed with locked/minimum OpenAI 2.45.0
  • 290 non-live tests passed with latest-within-major OpenAI 2.50.0
  • Ruff, format check, Pyright strict, version/public-doc, secret, workflow semantic, and actionlint checks passed
  • wheel and sdist passed twine, artifact inspection, independent clean install, mocked calls, and README examples
  • copied standalone repository verification passed

Release impact

This is a backward-compatible 0.1.x patch fix. Package version files remain at 0.1.0 for Release Please to generate the reviewed 0.1.1 release PR.

@tensornull
tensornull marked this pull request as ready for review July 29, 2026 03:23
@tensornull
tensornull merged commit d02b1db into main Jul 29, 2026
10 checks passed
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.

1 participant