mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(common_utils.py): handle $id in response schema when calling vert… (#8991)
* fix(common_utils.py): handle $id in response schema when calling vertex ai Fixes issue where `$id` present in response_schema was not accepted by vertex ai * test(test_vertex.py): add unit test to ensure $id stripped out of vertex schema
This commit is contained in:
parent
252c10ad08
commit
ce2d7bf9e6
3 changed files with 8 additions and 0 deletions
|
@ -170,6 +170,9 @@ def _build_vertex_schema(parameters: dict):
|
|||
strip_field(
|
||||
parameters, field_name="$schema"
|
||||
) # 5. Remove $schema - json schema value, not supported by OpenAPI - causes vertex errors.
|
||||
strip_field(
|
||||
parameters, field_name="$id"
|
||||
) # 6. Remove id - json schema value, not supported by OpenAPI - causes vertex errors.
|
||||
|
||||
return parameters
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue