Skip to content

[codex] Handle empty model response choices - #67

Open
h0rv wants to merge 4 commits into
jxnl:mainfrom
h0rv:codex-fix-empty-openai-jsonschema-choices
Open

h0rv wants to merge 4 commits into
jxnl:mainfrom
h0rv:codex-fix-empty-openai-jsonschema-choices

Conversation

@h0rv

@h0rv h0rv commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #66.

Summary

  • Guard OpenAI JSON and JSONSchema response handling before reading Choices[0].
  • Skip empty OpenAI stream chunks instead of panicking on Choices[0].
  • Add matching guards for Anthropic JSONSchema content and schema ref parsing.
  • Add a focused OpenAI regression test for empty choices.

Validation

  • GOCACHE=/tmp/go-build-cache GOMODCACHE=/tmp/go-mod-cache go test ./...

@h0rv
h0rv marked this pull request as ready for review May 22, 2026 18:31
@h0rv

h0rv commented May 22, 2026

Copy link
Copy Markdown
Collaborator Author

@jxnl +1 plz?

@h0rv

h0rv commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator Author

@jxnl would i get be able to get admin access to this repo again please - would make bumping deps + small bug fixes easier as the repo is mostly in maintenance state. Thanks!

@h0rv
h0rv requested a review from jxnl June 22, 2026 18:03
@pancsta

pancsta commented Aug 7, 2026

Copy link
Copy Markdown

...the repo is mostly in maintenance state

Are you saying I should migrate to another AI layer?

@h0rv

h0rv commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator Author

Hey, @jxnl, could you restore my admin access to instructor-go? I think it was lost when the repo moved between your account and the org. I still have write access, but this bug-fix PR is blocked on required approval, and you and I are the only collaborators.

I’m happy to keep handling maintenance and bug-fix releases on the existing repo rather than fork and split its users. You can retain ownership; I just need the access to keep maintenance moving without requiring your review for every fix. Thanks!

@h0rv

h0rv commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@jxnl-oai Could you restore my admin access to instructor-go? I think I lost it during the repo transfers. I still have write access, but required approval is blocking this bug fix. I would like to keep maintaining the existing repo rather than fork it.

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.

Panic on empty array for JSONSchema

3 participants