Commit cab0911
Use different JSON schema transformers for GLA vs Vertex AI
Based on reviewer feedback, this commit implements different JSON schema
transformation strategies for Google's two API endpoints:
- GLA (Generative Language API): Uses GoogleGLAJsonSchemaTransformer which
inlines $defs as a defensive measure for recursive schemas that have
historically had reliability issues on GLA
- Vertex AI: Uses GoogleJsonSchemaTransformer which preserves $refs and
takes full advantage of Google's enhanced JSON Schema support
This approach provides maximum compatibility while being defensive about
potential issues with recursive schemas on GLA.
Changes:
- Added is_vertexai parameter to google_model_profile()
- GoogleProvider.model_profile() now checks the client type and passes it along
- Created GoogleGLAJsonSchemaTransformer that inlines definitions
- Vertex AI continues to use the standard GoogleJsonSchemaTransformer
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8dcf07a commit cab0911
2 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
10 | 18 | | |
11 | | - | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
44 | 52 | | |
45 | 53 | | |
46 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
0 commit comments