Skip to content

Improve OpenAI base url error handling#75

Merged
dacharyc merged 2 commits intomainfrom
improve-base-url-error-handling
Apr 29, 2026
Merged

Improve OpenAI base url error handling#75
dacharyc merged 2 commits intomainfrom
improve-base-url-error-handling

Conversation

@dacharyc
Copy link
Copy Markdown
Member

What this PR does

Issue #70 reported an error related to missing base URL. On investigation, this can occur when the organization account is tied to a regional endpoint. This is an organizational setting I hadn't tested with, and as a result my documentation and error handling was unclear. This PR clarifies the requirement in the docs, and also checks for this error and provides a clearer hint with suggestion.

How to test

New TestOpenAIClient_RegionalHostnameError to test for the expected behavior.

Checklist

  • Tests pass locally (go test -race ./... -count=1)
  • Lint passes locally (golangci-lint run)
  • New functionality includes tests
  • Breaking changes are noted above (if any)

@dacharyc dacharyc merged commit 7480766 into main Apr 29, 2026
3 checks passed
@dacharyc dacharyc deleted the improve-base-url-error-handling branch April 29, 2026 00:32
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