ruby_llm-providers-qiniu 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/.flayignore +1 -0
  3. data/.github/workflows/ci.yml +28 -0
  4. data/.github/workflows/gitleaks.yml +23 -0
  5. data/.github/workflows/release.yml +36 -0
  6. data/.overcommit.yml +31 -0
  7. data/.rspec +2 -0
  8. data/.rubocop.yml +29 -0
  9. data/Archspec.rb +14 -0
  10. data/LICENSE +21 -0
  11. data/README.md +114 -0
  12. data/lib/ruby_llm/providers/qiniu.rb +134 -0
  13. data/models.json +859 -0
  14. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_can_handle_a_multi_turn_conversation.yml +154 -0
  15. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_can_have_a_basic_conversation.yml +61 -0
  16. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_can_use_tools.yml +121 -0
  17. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_returns_structured_output.yml +62 -0
  18. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_returns_the_raw_response.yml +66 -0
  19. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_anthropic_claude_sonnet_5_supports_streaming_responses.yml +105 -0
  20. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_can_handle_a_multi_turn_conversation.yml +127 -0
  21. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_can_have_a_basic_conversation.yml +58 -0
  22. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_can_use_tools.yml +119 -0
  23. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_returns_structured_output.yml +59 -0
  24. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_returns_the_raw_response.yml +58 -0
  25. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_deepseek_deepseek_v4_1_flash_supports_streaming_responses.yml +89 -0
  26. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_can_handle_a_multi_turn_conversation.yml +195 -0
  27. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_can_have_a_basic_conversation.yml +96 -0
  28. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_can_use_tools.yml +165 -0
  29. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_returns_structured_output.yml +97 -0
  30. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_returns_the_raw_response.yml +97 -0
  31. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_gemini_3_1_flash_lite_preview_supports_streaming_responses.yml +70 -0
  32. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_can_handle_a_multi_turn_conversation.yml +194 -0
  33. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_can_have_a_basic_conversation.yml +96 -0
  34. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_can_use_tools.yml +165 -0
  35. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_returns_structured_output.yml +97 -0
  36. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_returns_the_raw_response.yml +97 -0
  37. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_1_flash_lite_supports_streaming_responses.yml +70 -0
  38. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_can_handle_a_multi_turn_conversation.yml +199 -0
  39. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_can_have_a_basic_conversation.yml +97 -0
  40. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_can_use_tools.yml +166 -0
  41. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_returns_structured_output.yml +98 -0
  42. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_returns_the_raw_response.yml +98 -0
  43. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_google_gemini_3_8_flash_supports_streaming_responses.yml +71 -0
  44. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_can_handle_a_multi_turn_conversation.yml +419 -0
  45. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_can_have_a_basic_conversation.yml +210 -0
  46. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_can_use_tools.yml +468 -0
  47. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_returns_structured_output.yml +229 -0
  48. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_returns_the_raw_response.yml +210 -0
  49. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_2_supports_streaming_responses.yml +102 -0
  50. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_can_handle_a_multi_turn_conversation.yml +421 -0
  51. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_can_have_a_basic_conversation.yml +157 -0
  52. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_can_use_tools.yml +469 -0
  53. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_can_handle_a_multi_turn_conversation.yml +422 -0
  54. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_can_have_a_basic_conversation.yml +211 -0
  55. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_can_use_tools.yml +469 -0
  56. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_returns_structured_output.yml +230 -0
  57. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_returns_the_raw_response.yml +211 -0
  58. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_mini_supports_streaming_responses.yml +102 -0
  59. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_returns_structured_output.yml +230 -0
  60. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_returns_the_raw_response.yml +157 -0
  61. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_4_supports_streaming_responses.yml +102 -0
  62. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_can_handle_a_multi_turn_conversation.yml +389 -0
  63. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_can_have_a_basic_conversation.yml +241 -0
  64. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_can_use_tools.yml +437 -0
  65. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_returns_structured_output.yml +214 -0
  66. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_returns_the_raw_response.yml +241 -0
  67. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_5_6_luna_supports_streaming_responses.yml +106 -0
  68. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_can_handle_a_multi_turn_conversation.yml +389 -0
  69. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_can_have_a_basic_conversation.yml +202 -0
  70. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_can_use_tools.yml +437 -0
  71. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_returns_structured_output.yml +221 -0
  72. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_returns_the_raw_response.yml +202 -0
  73. data/spec/fixtures/vcr_cassettes/rubyllm_chat_qiniu_openai_gpt_6_luna_supports_streaming_responses.yml +112 -0
  74. data/spec/ruby_llm/chat_schema_spec.rb +30 -0
  75. data/spec/ruby_llm/chat_spec.rb +35 -0
  76. data/spec/ruby_llm/chat_streaming_spec.rb +22 -0
  77. data/spec/ruby_llm/chat_tools_spec.rb +32 -0
  78. data/spec/ruby_llm/embedding_spec.rb +49 -0
  79. data/spec/ruby_llm/image_spec.rb +23 -0
  80. data/spec/ruby_llm/models_spec.rb +11 -0
  81. data/spec/ruby_llm/moderation_spec.rb +22 -0
  82. data/spec/ruby_llm/providers/qiniu_spec.rb +103 -0
  83. data/spec/ruby_llm/rerank_spec.rb +23 -0
  84. data/spec/ruby_llm/speech_spec.rb +25 -0
  85. data/spec/ruby_llm/video_spec.rb +27 -0
  86. data/spec/spec_helper.rb +26 -0
  87. data/spec/support/models.rb +30 -0
  88. data/spec/support/rubyllm_configuration.rb +14 -0
  89. data/spec/support/vcr_configuration.rb +16 -0
  90. metadata +147 -0
@@ -0,0 +1,195 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/gemini-3.1-flash-lite-preview:generateContent"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"Who created the programming
9
+ language Ruby?"}]}],"generationConfig":{}}'
10
+ headers:
11
+ User-Agent:
12
+ - Faraday v2.14.4
13
+ Authorization:
14
+ - Bearer <AUTH_TOKEN>
15
+ Content-Type:
16
+ - application/json
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Content-Type:
27
+ - application/json; charset=UTF-8
28
+ Access-Control-Allow-Credentials:
29
+ - 'true'
30
+ Access-Control-Allow-Headers:
31
+ - ''
32
+ Access-Control-Allow-Methods:
33
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
34
+ Access-Control-Allow-Origin:
35
+ - ''
36
+ Access-Control-Expose-Headers:
37
+ - Http_x_reqid
38
+ Http-X-Reqid:
39
+ - chatptvtx-67d0ed4fe1374c938a3bb97f72da7ef7
40
+ X-Request-Id:
41
+ - chatptvtx-67d0ed4fe1374c938a3bb97f72da7ef7
42
+ Server:
43
+ - APISIX
44
+ Cache-Control:
45
+ - no-cache
46
+ Content-Length:
47
+ - '1012'
48
+ Connection:
49
+ - keep-alive
50
+ Date:
51
+ - Mon, 28 Sep 2026 09:11:48 GMT
52
+ Eo-Log-Uuid:
53
+ - '15232136906236110525'
54
+ Eo-Cache-Status:
55
+ - MISS
56
+ body:
57
+ encoding: UTF-8
58
+ string: |
59
+ {
60
+ "candidates": [
61
+ {
62
+ "content": {
63
+ "role": "model",
64
+ "parts": [
65
+ {
66
+ "text": "The programming language Ruby was created by **Yukihiro Matsumoto** (often known in the community as **Matz**). \n\nHe released the first version of Ruby in 1995 in Japan.",
67
+ "thoughtSignature": "AY89a194zlbjgVsMqiO579qYnfeVbwt8kq4+Ic1W6wy2cTLtnWu96KboTQTczW+S3ACrX031KmC8ltRuUmv/I803IksovlDsyr4qk+LSuQxBRaZVkQxiFk9e"
68
+ }
69
+ ]
70
+ },
71
+ "finishReason": "STOP"
72
+ }
73
+ ],
74
+ "usageMetadata": {
75
+ "promptTokenCount": 7,
76
+ "candidatesTokenCount": 43,
77
+ "totalTokenCount": 50,
78
+ "trafficType": "ON_DEMAND",
79
+ "promptTokensDetails": [
80
+ {
81
+ "modality": "TEXT",
82
+ "tokenCount": 7
83
+ }
84
+ ],
85
+ "candidatesTokensDetails": [
86
+ {
87
+ "modality": "TEXT",
88
+ "tokenCount": 43
89
+ }
90
+ ]
91
+ },
92
+ "modelVersion": "gemini-3.1-flash-lite",
93
+ "createTime": "2026-09-28T09:11:49.409793Z",
94
+ "responseId": "VS-6asGBGb6mq8YP0arHkAQ"
95
+ }
96
+ recorded_at: Mon, 28 Sep 2026 09:11:50 GMT
97
+ - request:
98
+ method: post
99
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/gemini-3.1-flash-lite-preview:generateContent"
100
+ body:
101
+ encoding: UTF-8
102
+ string: '{"contents":[{"role":"user","parts":[{"text":"Who created the programming
103
+ language Ruby?"}]},{"role":"model","parts":[{"thought":true,"thoughtSignature":"AY89a194zlbjgVsMqiO579qYnfeVbwt8kq4+Ic1W6wy2cTLtnWu96KboTQTczW+S3ACrX031KmC8ltRuUmv/I803IksovlDsyr4qk+LSuQxBRaZVkQxiFk9e"},{"text":"The
104
+ programming language Ruby was created by **Yukihiro Matsumoto** (often known
105
+ in the community as **Matz**). \n\nHe released the first version of Ruby in
106
+ 1995 in Japan."}]},{"role":"user","parts":[{"text":"What year was Ruby first
107
+ released?"}]}],"generationConfig":{}}'
108
+ headers:
109
+ User-Agent:
110
+ - Faraday v2.14.4
111
+ Authorization:
112
+ - Bearer <AUTH_TOKEN>
113
+ Content-Type:
114
+ - application/json
115
+ Accept-Encoding:
116
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
117
+ Accept:
118
+ - "*/*"
119
+ response:
120
+ status:
121
+ code: 200
122
+ message: OK
123
+ headers:
124
+ Content-Type:
125
+ - application/json; charset=UTF-8
126
+ Access-Control-Allow-Credentials:
127
+ - 'true'
128
+ Access-Control-Allow-Headers:
129
+ - ''
130
+ Access-Control-Allow-Methods:
131
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
132
+ Access-Control-Allow-Origin:
133
+ - ''
134
+ Access-Control-Expose-Headers:
135
+ - Http_x_reqid
136
+ Http-X-Reqid:
137
+ - chatptvtx-c2a00d581ab4403bac51b05c101467c5
138
+ X-Request-Id:
139
+ - chatptvtx-c2a00d581ab4403bac51b05c101467c5
140
+ Server:
141
+ - APISIX
142
+ Cache-Control:
143
+ - no-cache
144
+ Content-Length:
145
+ - '892'
146
+ Connection:
147
+ - keep-alive
148
+ Date:
149
+ - Mon, 28 Sep 2026 09:11:50 GMT
150
+ Eo-Log-Uuid:
151
+ - '8063645740001973301'
152
+ Eo-Cache-Status:
153
+ - MISS
154
+ body:
155
+ encoding: UTF-8
156
+ string: |
157
+ {
158
+ "candidates": [
159
+ {
160
+ "content": {
161
+ "role": "model",
162
+ "parts": [
163
+ {
164
+ "text": "Ruby was first released on **December 21, 1995**.",
165
+ "thoughtSignature": "AY89a18Md17hiNA8D/C3chWcRGwnUCy0yHm8DZQ/4v8Coiat6Gf5LiXmyWwMVS3gWthUd/7JCCYTCZBhOpJfSQLeD8VeVfUjEE7In5KC7MDruAmP4hu9qlMR"
166
+ }
167
+ ]
168
+ },
169
+ "finishReason": "STOP"
170
+ }
171
+ ],
172
+ "usageMetadata": {
173
+ "promptTokenCount": 57,
174
+ "candidatesTokenCount": 17,
175
+ "totalTokenCount": 74,
176
+ "trafficType": "ON_DEMAND",
177
+ "promptTokensDetails": [
178
+ {
179
+ "modality": "TEXT",
180
+ "tokenCount": 57
181
+ }
182
+ ],
183
+ "candidatesTokensDetails": [
184
+ {
185
+ "modality": "TEXT",
186
+ "tokenCount": 17
187
+ }
188
+ ]
189
+ },
190
+ "modelVersion": "gemini-3.1-flash-lite",
191
+ "createTime": "2026-09-28T09:11:51.245760Z",
192
+ "responseId": "Vy-6aoCAD4-epucP1f7t6AY"
193
+ }
194
+ recorded_at: Mon, 28 Sep 2026 09:11:51 GMT
195
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,96 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/gemini-3.1-flash-lite-preview:generateContent"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"What''s 2 + 2?"}]}],"generationConfig":{}}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.14.4
12
+ Authorization:
13
+ - Bearer <AUTH_TOKEN>
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Access-Control-Allow-Credentials:
28
+ - 'true'
29
+ Access-Control-Allow-Headers:
30
+ - ''
31
+ Access-Control-Allow-Methods:
32
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - ''
35
+ Access-Control-Expose-Headers:
36
+ - Http_x_reqid
37
+ Http-X-Reqid:
38
+ - chatptvtx-feb27e5270904ef99d3bd0a20c9caef9
39
+ X-Request-Id:
40
+ - chatptvtx-feb27e5270904ef99d3bd0a20c9caef9
41
+ Server:
42
+ - APISIX
43
+ Cache-Control:
44
+ - no-cache
45
+ Content-Length:
46
+ - '848'
47
+ Connection:
48
+ - keep-alive
49
+ Date:
50
+ - Mon, 28 Sep 2026 09:11:47 GMT
51
+ Eo-Log-Uuid:
52
+ - '10281892116648129436'
53
+ Eo-Cache-Status:
54
+ - MISS
55
+ body:
56
+ encoding: UTF-8
57
+ string: |
58
+ {
59
+ "candidates": [
60
+ {
61
+ "content": {
62
+ "role": "model",
63
+ "parts": [
64
+ {
65
+ "text": "2 + 2 = 4",
66
+ "thoughtSignature": "AY89a18nOuxmOEvUZCO1cHONWiVlreGZMuQSqGACaqzNzH56LlRLmcZDO9IwtrVcXLJMhg005LtBJZ2OUamMrhl2VPP4nz8lLcFoAMsctKlD6ypcfNlkGFtv"
67
+ }
68
+ ]
69
+ },
70
+ "finishReason": "STOP"
71
+ }
72
+ ],
73
+ "usageMetadata": {
74
+ "promptTokenCount": 9,
75
+ "candidatesTokenCount": 7,
76
+ "totalTokenCount": 16,
77
+ "trafficType": "ON_DEMAND",
78
+ "promptTokensDetails": [
79
+ {
80
+ "modality": "TEXT",
81
+ "tokenCount": 9
82
+ }
83
+ ],
84
+ "candidatesTokensDetails": [
85
+ {
86
+ "modality": "TEXT",
87
+ "tokenCount": 7
88
+ }
89
+ ]
90
+ },
91
+ "modelVersion": "gemini-3.1-flash-lite",
92
+ "createTime": "2026-09-28T09:11:47.842441Z",
93
+ "responseId": "Uy-6asm1M7-Vq8YPsPulgAI"
94
+ }
95
+ recorded_at: Mon, 28 Sep 2026 09:11:48 GMT
96
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,165 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/gemini-3.1-flash-lite-preview:generateContent"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"What''s the weather in
9
+ Berlin? Use 52.5200, 13.4050."}]}],"generationConfig":{},"tools":[{"functionDeclarations":[{"name":"weather","description":"Gets
10
+ current weather for a location","parametersJsonSchema":{"type":"object","properties":{"latitude":{"type":"string","description":"Latitude"},"longitude":{"type":"string","description":"Longitude"}},"required":["latitude","longitude"],"additionalProperties":false,"strict":true}}]}]}'
11
+ headers:
12
+ User-Agent:
13
+ - Faraday v2.14.4
14
+ Authorization:
15
+ - Bearer <AUTH_TOKEN>
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Accept:
21
+ - "*/*"
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Content-Type:
28
+ - application/json; charset=UTF-8
29
+ Access-Control-Allow-Credentials:
30
+ - 'true'
31
+ Access-Control-Allow-Headers:
32
+ - ''
33
+ Access-Control-Allow-Methods:
34
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
35
+ Access-Control-Allow-Origin:
36
+ - ''
37
+ Access-Control-Expose-Headers:
38
+ - Http_x_reqid
39
+ Http-X-Reqid:
40
+ - chatptvtx-ae52969c243f4d609a9eba1fdb972774
41
+ X-Request-Id:
42
+ - chatptvtx-ae52969c243f4d609a9eba1fdb972774
43
+ Server:
44
+ - APISIX
45
+ Cache-Control:
46
+ - no-cache
47
+ Content-Length:
48
+ - '1050'
49
+ Connection:
50
+ - keep-alive
51
+ Date:
52
+ - Mon, 28 Sep 2026 09:11:58 GMT
53
+ Eo-Log-Uuid:
54
+ - '4694288386634238176'
55
+ Eo-Cache-Status:
56
+ - MISS
57
+ body:
58
+ encoding: UTF-8
59
+ string: |
60
+ {
61
+ "candidates": [
62
+ {
63
+ "content": {
64
+ "role": "model",
65
+ "parts": [
66
+ {
67
+ "functionCall": {
68
+ "name": "weather",
69
+ "args": {
70
+ "longitude": "13.4050",
71
+ "latitude": "52.5200"
72
+ },
73
+ "id": "call_577611"
74
+ },
75
+ "thoughtSignature": "AY89a197Xd65OAHamTif1HQHpVU3gX2Gz2F9YhFHjRahuOfZCmc8anews/jnlaqZaIN0U3uUu/OmjTcul+GnWooCd5MpUu0Bpd4yx9Pb4XTFu6xr5/aEoITS"
76
+ }
77
+ ]
78
+ },
79
+ "finishReason": "STOP"
80
+ }
81
+ ],
82
+ "usageMetadata": {
83
+ "promptTokenCount": 56,
84
+ "candidatesTokenCount": 32,
85
+ "totalTokenCount": 88,
86
+ "trafficType": "ON_DEMAND",
87
+ "promptTokensDetails": [
88
+ {
89
+ "modality": "TEXT",
90
+ "tokenCount": 56
91
+ }
92
+ ],
93
+ "candidatesTokensDetails": [
94
+ {
95
+ "modality": "TEXT",
96
+ "tokenCount": 32
97
+ }
98
+ ]
99
+ },
100
+ "modelVersion": "gemini-3.1-flash-lite",
101
+ "createTime": "2026-09-28T09:11:59.426563Z",
102
+ "responseId": "Xy-6asOEGq7K998PlMiwkAE"
103
+ }
104
+ recorded_at: Mon, 28 Sep 2026 09:12:02 GMT
105
+ - request:
106
+ method: post
107
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/gemini-3.1-flash-lite-preview:generateContent"
108
+ body:
109
+ encoding: UTF-8
110
+ string: '{"contents":[{"role":"user","parts":[{"text":"What''s the weather in
111
+ Berlin? Use 52.5200, 13.4050."}]},{"role":"model","parts":[{"functionCall":{"name":"weather","args":{"longitude":"13.4050","latitude":"52.5200"}},"thoughtSignature":"AY89a197Xd65OAHamTif1HQHpVU3gX2Gz2F9YhFHjRahuOfZCmc8anews/jnlaqZaIN0U3uUu/OmjTcul+GnWooCd5MpUu0Bpd4yx9Pb4XTFu6xr5/aEoITS"}]},{"role":"user","parts":[{"functionResponse":{"name":"weather","response":{"name":"weather","content":[{"text":"Current
112
+ weather at 52.5200, 13.4050: 15°C, Wind: 10 km/h"}]}}}]}],"generationConfig":{},"tools":[{"functionDeclarations":[{"name":"weather","description":"Gets
113
+ current weather for a location","parametersJsonSchema":{"type":"object","properties":{"latitude":{"type":"string","description":"Latitude"},"longitude":{"type":"string","description":"Longitude"}},"required":["latitude","longitude"],"additionalProperties":false,"strict":true}}]}]}'
114
+ headers:
115
+ User-Agent:
116
+ - Faraday v2.14.4
117
+ Authorization:
118
+ - Bearer <AUTH_TOKEN>
119
+ Content-Type:
120
+ - application/json
121
+ Accept-Encoding:
122
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
123
+ Accept:
124
+ - "*/*"
125
+ response:
126
+ status:
127
+ code: 200
128
+ message: OK
129
+ headers:
130
+ Content-Type:
131
+ - application/json; charset=UTF-8
132
+ Access-Control-Allow-Credentials:
133
+ - 'true'
134
+ Access-Control-Allow-Headers:
135
+ - ''
136
+ Access-Control-Allow-Methods:
137
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
138
+ Access-Control-Allow-Origin:
139
+ - ''
140
+ Access-Control-Expose-Headers:
141
+ - Http_x_reqid
142
+ Http-X-Reqid:
143
+ - chatptvtx-4642cae6c1e44ef9ae435544a00247b8
144
+ X-Request-Id:
145
+ - chatptvtx-4642cae6c1e44ef9ae435544a00247b8
146
+ Server:
147
+ - APISIX
148
+ Cache-Control:
149
+ - no-cache
150
+ Content-Length:
151
+ - '914'
152
+ Connection:
153
+ - keep-alive
154
+ Date:
155
+ - Mon, 28 Sep 2026 09:12:02 GMT
156
+ Eo-Log-Uuid:
157
+ - '8518334152276595426'
158
+ Eo-Cache-Status:
159
+ - MISS
160
+ body:
161
+ encoding: ASCII-8BIT
162
+ string: !binary |-
163
+ ewogICJjYW5kaWRhdGVzIjogWwogICAgewogICAgICAiY29udGVudCI6IHsKICAgICAgICAicm9sZSI6ICJtb2RlbCIsCiAgICAgICAgInBhcnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAidGV4dCI6ICJUaGUgY3VycmVudCB3ZWF0aGVyIGluIEJlcmxpbiBpcyAxNcKwQyB3aXRoIGEgd2luZCBzcGVlZCBvZiAxMCBrbS9oLiIsCiAgICAgICAgICAgICJ0aG91Z2h0U2lnbmF0dXJlIjogIkFZODlhMStYczZVNm1SMGFPNTY4MmJmVmgxTXJDQnNvZnMzYUpuOHp0bklOY3MxUmNuSldLbDlvWjR1ckZRbCtCbGhzK2ViYUthd2w5YWtJVnRVZDFUUHRBaGVuUWtLK1huTzAzR2dIWWJvMEpkTEFFMHVkbUc3QiIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgICJmaW5pc2hSZWFzb24iOiAiU1RPUCIKICAgIH0KICBdLAogICJ1c2FnZU1ldGFkYXRhIjogewogICAgInByb21wdFRva2VuQ291bnQiOiAxMjEsCiAgICAiY2FuZGlkYXRlc1Rva2VuQ291bnQiOiAyMywKICAgICJ0b3RhbFRva2VuQ291bnQiOiAxNDQsCiAgICAidHJhZmZpY1R5cGUiOiAiT05fREVNQU5EIiwKICAgICJwcm9tcHRUb2tlbnNEZXRhaWxzIjogWwogICAgICB7CiAgICAgICAgIm1vZGFsaXR5IjogIlRFWFQiLAogICAgICAgICJ0b2tlbkNvdW50IjogMTIxCiAgICAgIH0KICAgIF0sCiAgICAiY2FuZGlkYXRlc1Rva2Vuc0RldGFpbHMiOiBbCiAgICAgIHsKICAgICAgICAibW9kYWxpdHkiOiAiVEVYVCIsCiAgICAgICAgInRva2VuQ291bnQiOiAyMwogICAgICB9CiAgICBdCiAgfSwKICAibW9kZWxWZXJzaW9uIjogImdlbWluaS0zLjEtZmxhc2gtbGl0ZSIsCiAgImNyZWF0ZVRpbWUiOiAiMjAyNi0wOS0yOFQwOToxMjowMy4wMzY1NjFaIiwKICAicmVzcG9uc2VJZCI6ICJZeS02YXRHZEFzV0ZwdWNQcGJyZm1BZyIKfQo=
164
+ recorded_at: Mon, 28 Sep 2026 09:12:03 GMT
165
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,97 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/gemini-3.1-flash-lite-preview:generateContent"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"Generate a person named
9
+ John who is 30 years old"}]}],"generationConfig":{"responseMimeType":"application/json","responseJsonSchema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"],"additionalProperties":false}}}'
10
+ headers:
11
+ User-Agent:
12
+ - Faraday v2.14.4
13
+ Authorization:
14
+ - Bearer <AUTH_TOKEN>
15
+ Content-Type:
16
+ - application/json
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Content-Type:
27
+ - application/json; charset=UTF-8
28
+ Access-Control-Allow-Credentials:
29
+ - 'true'
30
+ Access-Control-Allow-Headers:
31
+ - ''
32
+ Access-Control-Allow-Methods:
33
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
34
+ Access-Control-Allow-Origin:
35
+ - ''
36
+ Access-Control-Expose-Headers:
37
+ - Http_x_reqid
38
+ Http-X-Reqid:
39
+ - chatptvtx-17826dc619534613b24ae29d399f7f37
40
+ X-Request-Id:
41
+ - chatptvtx-17826dc619534613b24ae29d399f7f37
42
+ Server:
43
+ - APISIX
44
+ Cache-Control:
45
+ - no-cache
46
+ Content-Length:
47
+ - '876'
48
+ Connection:
49
+ - keep-alive
50
+ Date:
51
+ - Mon, 28 Sep 2026 09:12:03 GMT
52
+ Eo-Log-Uuid:
53
+ - '14417540234912691786'
54
+ Eo-Cache-Status:
55
+ - MISS
56
+ body:
57
+ encoding: UTF-8
58
+ string: |
59
+ {
60
+ "candidates": [
61
+ {
62
+ "content": {
63
+ "role": "model",
64
+ "parts": [
65
+ {
66
+ "text": "{\"name\": \"John\", \"age\": 30}",
67
+ "thoughtSignature": "AY89a19nqR9ZDmXZJsjqtT0ZYDNm1b9tBUp+5YcnAeWrjGOa6yD14s43HJxTqIPyhmUM/3IP1klEG028UO3AVjiTSAeUyVUAWA4dXPHJ2UiUnSr6Dw5R5QeE"
68
+ }
69
+ ]
70
+ },
71
+ "finishReason": "STOP"
72
+ }
73
+ ],
74
+ "usageMetadata": {
75
+ "promptTokenCount": 77,
76
+ "candidatesTokenCount": 13,
77
+ "totalTokenCount": 90,
78
+ "trafficType": "ON_DEMAND",
79
+ "promptTokensDetails": [
80
+ {
81
+ "modality": "TEXT",
82
+ "tokenCount": 77
83
+ }
84
+ ],
85
+ "candidatesTokensDetails": [
86
+ {
87
+ "modality": "TEXT",
88
+ "tokenCount": 13
89
+ }
90
+ ]
91
+ },
92
+ "modelVersion": "gemini-3.1-flash-lite",
93
+ "createTime": "2026-09-28T09:12:04.537626Z",
94
+ "responseId": "ZC-6aproIMeK9LsP3vi96QQ"
95
+ }
96
+ recorded_at: Mon, 28 Sep 2026 09:12:05 GMT
97
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,97 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/gemini-3.1-flash-lite-preview:generateContent"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"What is the capital of
9
+ France?"}]}],"generationConfig":{}}'
10
+ headers:
11
+ User-Agent:
12
+ - Faraday v2.14.4
13
+ Authorization:
14
+ - Bearer <AUTH_TOKEN>
15
+ Content-Type:
16
+ - application/json
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ Accept:
20
+ - "*/*"
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Content-Type:
27
+ - application/json; charset=UTF-8
28
+ Access-Control-Allow-Credentials:
29
+ - 'true'
30
+ Access-Control-Allow-Headers:
31
+ - ''
32
+ Access-Control-Allow-Methods:
33
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
34
+ Access-Control-Allow-Origin:
35
+ - ''
36
+ Access-Control-Expose-Headers:
37
+ - Http_x_reqid
38
+ Http-X-Reqid:
39
+ - chatptvtx-99a3eee6c5104627a31ac15005f5a75b
40
+ X-Request-Id:
41
+ - chatptvtx-99a3eee6c5104627a31ac15005f5a75b
42
+ Server:
43
+ - APISIX
44
+ Cache-Control:
45
+ - no-cache
46
+ Content-Length:
47
+ - '870'
48
+ Connection:
49
+ - keep-alive
50
+ Date:
51
+ - Mon, 28 Sep 2026 09:11:52 GMT
52
+ Eo-Log-Uuid:
53
+ - '13959100578104408538'
54
+ Eo-Cache-Status:
55
+ - MISS
56
+ body:
57
+ encoding: UTF-8
58
+ string: |
59
+ {
60
+ "candidates": [
61
+ {
62
+ "content": {
63
+ "role": "model",
64
+ "parts": [
65
+ {
66
+ "text": "The capital of France is Paris.",
67
+ "thoughtSignature": "AY89a18nqAnLdbBvsUtyiAIvBeXidWj3s2M1r4rskvYw0Yy18rbnUJVYuWCUxxwhEbpKId54nt3AWFIUTFR8aTv5uPFVVfT1cUkyOEuG5kdaN0SYy2y9P6gD"
68
+ }
69
+ ]
70
+ },
71
+ "finishReason": "STOP"
72
+ }
73
+ ],
74
+ "usageMetadata": {
75
+ "promptTokenCount": 7,
76
+ "candidatesTokenCount": 7,
77
+ "totalTokenCount": 14,
78
+ "trafficType": "ON_DEMAND",
79
+ "promptTokensDetails": [
80
+ {
81
+ "modality": "TEXT",
82
+ "tokenCount": 7
83
+ }
84
+ ],
85
+ "candidatesTokensDetails": [
86
+ {
87
+ "modality": "TEXT",
88
+ "tokenCount": 7
89
+ }
90
+ ]
91
+ },
92
+ "modelVersion": "gemini-3.1-flash-lite",
93
+ "createTime": "2026-09-28T09:11:53.138945Z",
94
+ "responseId": "WS-6asG9CMWFpucPpbrfmAg"
95
+ }
96
+ recorded_at: Mon, 28 Sep 2026 09:11:56 GMT
97
+ recorded_with: VCR 6.4.0