Skip to content

Update openai-go to v3.50.0 - #38

Open
HatsuneMiku3939 wants to merge 3 commits into
nlpodyssey:mainfrom
HatsuneMiku3939:contrib/openai-go-v3-50
Open

Update openai-go to v3.50.0#38
HatsuneMiku3939 wants to merge 3 commits into
nlpodyssey:mainfrom
HatsuneMiku3939:contrib/openai-go-v3-50

Conversation

@HatsuneMiku3939

Copy link
Copy Markdown

Summary

Update the OpenAI Go SDK dependency from v3.24.0 to v3.50.0 and adapt the generated response unions and renamed typed fields.

Background

The current dependency predates typed prompt cache options and later generated union changes. Updating directly to v3.50.0 keeps the project compatible with the current OpenAI Go SDK while preserving response conversion behavior.

Related issue(s)

None.

Implementation details

  • Update github.com/openai/openai-go/v3 to v3.50.0 and raise the Go requirement to 1.25.
  • Adapt assistant roles, function argument unions, MCP subunions, computer-use types, code-interpreter containers, and TTS voice unions.
  • Preserve multi-query web-search history, sources, and find-in-page actions.
  • Document the Go 1.25 requirement.

Test coverage

  • go vet ./...
  • go test ./...
  • GOTOOLCHAIN=go1.25.0 go test ./...
  • Regression coverage for prompt cache serialization, MCP subunions, web-search actions, and default or explicit TTS voices.

Breaking changes

  • The minimum Go version increases from 1.24.3 to 1.25.0 because openai-go v3.50.0 requires Go 1.25.
  • Public aliases exposing generated OpenAI SDK types follow the v3.50.0 role and union shapes.

Notes

Created by Codex

@HatsuneMiku3939

Copy link
Copy Markdown
Author

Addressed the review finding in 116a875:

  • Reject non-string arguments variants for function and MCP response items instead of silently using an empty string.
  • Reject non-string MCP call output variants.
  • Add table-driven regression coverage for malformed raw response payloads.
  • Re-ran go vet ./..., the full test suite with the current and Go 1.25.0 toolchains, and focused race tests.

@HatsuneMiku3939

Copy link
Copy Markdown
Author

Follow-up review fix in 80f8aa1:

  • Cover custom models that directly construct the generated union without JSON metadata.
  • Reject non-string any values while preserving SDK-decoded strings, including empty strings.
  • Add table-driven tests for direct map, struct, and slice argument variants.
  • Re-ran go vet ./..., go test ./..., and GOTOOLCHAIN=go1.25.0 go test ./....

@HatsuneMiku3939
HatsuneMiku3939 marked this pull request as ready for review August 9, 2026 04:13
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