Skip to content

Github Copilot does not work when using Gemini #248000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
FlowerRealm opened this issue May 2, 2025 · 1 comment
Open

Github Copilot does not work when using Gemini #248000

FlowerRealm opened this issue May 2, 2025 · 1 comment
Assignees

Comments

@FlowerRealm
Copy link

FlowerRealm commented May 2, 2025

Type: Bug

I tried to use my own api to use the Gemini model in Github Copilot. Sometimes it worked, but most of the time it showed that

很抱歉,你的请求已失败。请重试。请求 ID: bd888b41-da4a-4da8-b16b-a198bc4a5c9c

原因: Request Failed: 400 [{ "error": { "code": 400, "message": "* GenerateContentRequest.tools[0].function_declarations[20].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[21].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[22].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[23].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[24].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[25].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[26].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[27].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[28].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[29].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[30].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[31].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[32].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[33].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[34].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[35].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[36].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[37].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[38].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[39].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[40].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[41].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[42].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[43].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[44].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n* GenerateContentRequest.tools[0].function_declarations[45].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.\n", "status": "INVALID_ARGUMENT" } } ]

VS Code version: Code 1.99.3 (17baf84, 2025-04-15T23:18:46.076Z)
OS version: Windows_NT x64 10.0.27842
Modes: Unsupported

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i9-12900H (20 x 2918)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.68GB (5.28GB free)
Process Argv --crash-reporter-id 315ebcef-82f1-41d7-b931-e0124b00e139
Screen Reader no
VM 0%
Extensions (22)
Extension Author (truncated) Version
project-manager ale 12.8.0
a-file-icon-vscode ato 2.0.1
path-intellisense chr 2.10.0
competitive-programming-helper Div 2025.4.1744912235
gitlens eam 17.0.3
copilot Git 1.312.0
copilot-chat Git 0.26.7
vscode-pull-request-github Git 0.108.0
comment-translate int 3.0.0
polacode-2019 jef 0.6.1
vscode-clangd llv 0.1.33
vscode-language-pack-zh-hans MS- 1.99.2025041609
debugpy ms- 2025.6.0
python ms- 2025.4.0
vscode-pylance ms- 2025.4.1
cmake-tools ms- 1.20.53
cpptools ms- 1.25.3
korofileheader OBK 4.9.3
indent-rainbow ode 8.3.1
material-icon-theme PKi 5.21.2
background sha 2.0.3
cmake twx 0.0.17

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
cp15370_t:31280197
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
563cc122:31253270
31787653:31262186
3e8i5726:31271747
996jf627:31283433
usemplatestapi:31297334
7bj51361:31289155
747dc170:31275177
aj496949:31278748
pylancecolor:31297615
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004

@lramos15
Copy link
Member

lramos15 commented May 2, 2025

Do you have logs? What do you mean the API was expired?

@lramos15 lramos15 added the info-needed Issue requires more information from poster label May 2, 2025
@vs-code-engineering vs-code-engineering bot removed the info-needed Issue requires more information from poster label May 4, 2025
@legomushroom legomushroom marked this as a duplicate of #246920 May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants