ai: unify claude JSON instructions and error handling#174
Conversation
|
Tested PR #174 on Vertex AI with The // prompts.rs:486-490
"type": "OBJECT",
"type": "ARRAY",
"type": "STRING"Claude API requires lowercase ( This is the same issue as #107. PR #108 (closed) fixed both problems (response_format + uppercase schemas), but only the response_format half made it into this PR. Quick fix -- in -"type": "OBJECT"
+"type": "object"
-"type": "ARRAY"
+"type": "array"
-"type": "STRING"
+"type": "string"Also check |
eab940f to
09b0464
Compare
09b0464 to
b27f7e1
Compare
Co-authored-by: Gemini CLI <noreply@google.com> Signed-off-by: derekbarbosa <derekasobrab@gmail.com>
Co-authored-by: Gemini CLI <noreply@google.com> Signed-off-by: derekbarbosa <derekasobrab@gmail.com>
b27f7e1 to
9bf0d40
Compare
|
Reworded some commits, added some more error handling for claude_cli, and unified JSON prompt building/formatting for claude responses. |
Co-authored-by: Gemini CLI <noreply@google.com> Signed-off-by: derekbarbosa <derekasobrab@gmail.com>
Co-authored-by: Gemini CLI <noreply@google.com> Signed-off-by: derekbarbosa <derekasobrab@gmail.com>
Co-authored-by: Gemini CLI <noreply@google.com> Signed-off-by: derekbarbosa <derekasobrab@gmail.com>
9bf0d40 to
9b49275
Compare
|
Addressed some Tested using us-east5 endpoint, E2E patch submission successful with sonnet & opus models via vertex. ready for review! @rgushchin |
|
Hi @rgushchin, sorry for the noise. Seems like there are others encountering the JSON encoding issue. Kindly asking for a review :-) |
Centralizes JSON instruction logic in src/ai/mod.rs by adding AiResponseFormat::format_json_schema_instruction().
Improves claude-cli in src/ai/claude_cli.rs:
Unifies Claude API in src/ai/claude.rs:
Updates error classification in src/ai/mod.rs to support the new ClaudeCliError.
fixes #171