Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
90b38381
Commit
90b38381
authored
Mar 15, 2026
by
IanShaw027
Browse files
fix: 移除 Gemini 不支持的 patternProperties 字段 #795
parent
19d3ecc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/gemini_messages_compat_service.go
View file @
90b38381
...
@@ -3235,7 +3235,7 @@ func cleanToolSchema(schema any) any {
...
@@ -3235,7 +3235,7 @@ func cleanToolSchema(schema any) any {
for
key
,
value
:=
range
v
{
for
key
,
value
:=
range
v
{
// 跳过不支持的字段
// 跳过不支持的字段
if
key
==
"$schema"
||
key
==
"$id"
||
key
==
"$ref"
||
if
key
==
"$schema"
||
key
==
"$id"
||
key
==
"$ref"
||
key
==
"additionalProperties"
||
key
==
"minLength"
||
key
==
"additionalProperties"
||
key
==
"patternProperties"
||
key
==
"minLength"
||
key
==
"maxLength"
||
key
==
"minItems"
||
key
==
"maxItems"
{
key
==
"maxLength"
||
key
==
"minItems"
||
key
==
"maxItems"
{
continue
continue
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment