Fix OAuth exchange hardening and Gemini anyOf schema normalization#58
Fix OAuth exchange hardening and Gemini anyOf schema normalization#58RovshanMuradov wants to merge 4 commits intojenslys:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d3fbd72cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a561bf3719
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Should this not be fixed in opencode instead? anomalyco/opencode#14509 |
Yeah, sorry didn't see that, it just didn't work for me this morning that's why I tried to fix it in plugin. |
|
We will have to wait a couple of weeks then... |
I just set this pr as main in plugin, you can do the same until they fix the bug |
What
anyOf.Fixes
Fixes the following error when using OpenCode built-in
edittool with Gemini models:Root cause: OpenCode sends JSON Schema where
anyOfhas sibling fields(
description,type, etc.), which Vertex AI rejects. This PR normalizesthe schema before sending so
anyOfis always the only field.How
trim).anyOfnodes do not carry sibling fields that Vertex rejects.Why
invalid_grant/malformed code paths) and prevents exchange crashes.anyOfschema shape.Validation
bun test→ 34 passed, 0 failedbunx tsc --noEmit→ no type errors