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,437 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"openai/gpt-6-luna","input":[{"role":"user","content":"What''s
9
+ the weather in Berlin? Use 52.5200, 13.4050."}],"stream":false,"store":false,"include":["reasoning.encrypted_content"],"tools":[{"type":"function","name":"weather","description":"Gets
10
+ current weather for a location","parameters":{"type":"object","properties":{"latitude":{"type":"string","description":"Latitude"},"longitude":{"type":"string","description":"Longitude"}},"required":["latitude","longitude"],"additionalProperties":false,"strict":true},"strict":false}]}'
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
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
+ - chatptrsp-25f732c7c9294c53925bd89efd72e124
41
+ X-Ratelimit-Abusepenalty-Active:
42
+ - 'False'
43
+ X-Ratelimit-Key:
44
+ - gpt-6-luna
45
+ X-Ratelimit-Limit-Requests:
46
+ - '15000'
47
+ X-Ratelimit-Limit-Tokens:
48
+ - '15000000'
49
+ X-Ratelimit-Remaining-Requests:
50
+ - '14999'
51
+ X-Ratelimit-Remaining-Tokens:
52
+ - '14999988'
53
+ X-Ratelimit-Renewalperiod-Requests:
54
+ - '60'
55
+ X-Ratelimit-Renewalperiod-Tokens:
56
+ - '60'
57
+ X-Ratelimit-Reset-Requests:
58
+ - '0'
59
+ X-Ratelimit-Reset-Tokens:
60
+ - '0'
61
+ X-Request-Id:
62
+ - 72c82cc8-7ddf-41f1-8b27-2ef5fc8b6c6f
63
+ Server:
64
+ - APISIX
65
+ Cache-Control:
66
+ - no-cache
67
+ Transfer-Encoding:
68
+ - chunked
69
+ Connection:
70
+ - keep-alive
71
+ Date:
72
+ - Wed, 30 Sep 2026 04:44:16 GMT
73
+ Eo-Log-Uuid:
74
+ - '2426212285219902758'
75
+ Eo-Cache-Status:
76
+ - MISS
77
+ body:
78
+ encoding: UTF-8
79
+ string: |-
80
+ {
81
+ "id": "resp_093f9e0933f3b219016abc93a12624819697463734a7d26563",
82
+ "object": "response",
83
+ "created_at": 1790743457,
84
+ "status": "completed",
85
+ "background": false,
86
+ "completed_at": 1790743458,
87
+ "content_filters": [
88
+ {
89
+ "blocked": false,
90
+ "source_type": "prompt",
91
+ "content_filter_raw": [],
92
+ "content_filter_results": {},
93
+ "content_filter_offsets": {
94
+ "start_offset": 0,
95
+ "end_offset": 84,
96
+ "check_offset": 0
97
+ }
98
+ },
99
+ {
100
+ "blocked": false,
101
+ "source_type": "completion",
102
+ "content_filter_raw": [],
103
+ "content_filter_results": {},
104
+ "content_filter_offsets": {
105
+ "start_offset": 0,
106
+ "end_offset": 44,
107
+ "check_offset": 0
108
+ }
109
+ }
110
+ ],
111
+ "error": null,
112
+ "frequency_penalty": 0.0,
113
+ "incomplete_details": null,
114
+ "instructions": null,
115
+ "max_output_tokens": null,
116
+ "max_tool_calls": null,
117
+ "model": "openai/gpt-6-luna",
118
+ "moderation": null,
119
+ "output": [
120
+ {
121
+ "id": "fc_093f9e0933f3b219016abc93a1d468819688632c8a6396414a",
122
+ "type": "function_call",
123
+ "status": "completed",
124
+ "arguments": "{\"latitude\":\"52.5200\",\"longitude\":\"13.4050\"}",
125
+ "call_id": "call_8uK6mMwHpHjtjqdxFOYyRydg",
126
+ "name": "weather"
127
+ }
128
+ ],
129
+ "parallel_tool_calls": true,
130
+ "presence_penalty": 0.0,
131
+ "previous_response_id": null,
132
+ "prompt_cache_key": null,
133
+ "prompt_cache_retention": "24h",
134
+ "reasoning": {
135
+ "context": "all_turns",
136
+ "effort": "medium",
137
+ "mode": "standard",
138
+ "summary": null
139
+ },
140
+ "safety_identifier": null,
141
+ "service_tier": "default",
142
+ "store": false,
143
+ "temperature": 1.0,
144
+ "text": {
145
+ "format": {
146
+ "type": "text"
147
+ },
148
+ "verbosity": "medium"
149
+ },
150
+ "tool_choice": "auto",
151
+ "tool_usage": {
152
+ "image_gen": {
153
+ "input_tokens": 0,
154
+ "input_tokens_details": {
155
+ "image_tokens": 0,
156
+ "text_tokens": 0
157
+ },
158
+ "output_tokens": 0,
159
+ "output_tokens_details": {
160
+ "image_tokens": 0,
161
+ "text_tokens": 0
162
+ },
163
+ "total_tokens": 0
164
+ },
165
+ "web_search": {
166
+ "num_requests": 0
167
+ }
168
+ },
169
+ "tools": [
170
+ {
171
+ "type": "function",
172
+ "description": "Gets current weather for a location",
173
+ "name": "weather",
174
+ "output_schema": null,
175
+ "parameters": {
176
+ "type": "object",
177
+ "properties": {
178
+ "latitude": {
179
+ "type": "string",
180
+ "description": "Latitude"
181
+ },
182
+ "longitude": {
183
+ "type": "string",
184
+ "description": "Longitude"
185
+ }
186
+ },
187
+ "required": [
188
+ "latitude",
189
+ "longitude"
190
+ ],
191
+ "additionalProperties": false,
192
+ "strict": true
193
+ },
194
+ "strict": false
195
+ }
196
+ ],
197
+ "top_logprobs": 0,
198
+ "top_p": 0.98,
199
+ "truncation": "disabled",
200
+ "usage": {
201
+ "input_tokens": 70,
202
+ "input_tokens_details": {
203
+ "cache_write_tokens": 0,
204
+ "cached_tokens": 0
205
+ },
206
+ "output_tokens": 27,
207
+ "output_tokens_details": {
208
+ "reasoning_tokens": 0
209
+ },
210
+ "total_tokens": 97
211
+ },
212
+ "user": null,
213
+ "metadata": {}
214
+ }
215
+ recorded_at: Wed, 30 Sep 2026 04:44:18 GMT
216
+ - request:
217
+ method: post
218
+ uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
219
+ body:
220
+ encoding: UTF-8
221
+ string: '{"model":"openai/gpt-6-luna","input":[{"role":"user","content":"What''s
222
+ the weather in Berlin? Use 52.5200, 13.4050."},{"type":"function_call","call_id":"call_8uK6mMwHpHjtjqdxFOYyRydg","name":"weather","arguments":"{\"latitude\":\"52.5200\",\"longitude\":\"13.4050\"}"},{"type":"function_call_output","call_id":"call_8uK6mMwHpHjtjqdxFOYyRydg","output":"Current
223
+ weather at 52.5200, 13.4050: 15°C, Wind: 10 km/h"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"],"tools":[{"type":"function","name":"weather","description":"Gets
224
+ current weather for a location","parameters":{"type":"object","properties":{"latitude":{"type":"string","description":"Latitude"},"longitude":{"type":"string","description":"Longitude"}},"required":["latitude","longitude"],"additionalProperties":false,"strict":true},"strict":false}]}'
225
+ headers:
226
+ User-Agent:
227
+ - Faraday v2.14.4
228
+ Authorization:
229
+ - Bearer <AUTH_TOKEN>
230
+ Content-Type:
231
+ - application/json
232
+ Accept-Encoding:
233
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
234
+ Accept:
235
+ - "*/*"
236
+ response:
237
+ status:
238
+ code: 200
239
+ message: OK
240
+ headers:
241
+ Content-Type:
242
+ - application/json
243
+ Access-Control-Allow-Credentials:
244
+ - 'true'
245
+ Access-Control-Allow-Headers:
246
+ - ''
247
+ Access-Control-Allow-Methods:
248
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
249
+ Access-Control-Allow-Origin:
250
+ - ''
251
+ Access-Control-Expose-Headers:
252
+ - Http_x_reqid
253
+ Http-X-Reqid:
254
+ - chatptrsp-96dbc889e7f348d39ef7b775d324bca8
255
+ X-Ratelimit-Abusepenalty-Active:
256
+ - 'False'
257
+ X-Ratelimit-Key:
258
+ - gpt-6-luna
259
+ X-Ratelimit-Limit-Requests:
260
+ - '15000'
261
+ X-Ratelimit-Limit-Tokens:
262
+ - '15000000'
263
+ X-Ratelimit-Remaining-Requests:
264
+ - '14999'
265
+ X-Ratelimit-Remaining-Tokens:
266
+ - '14999963'
267
+ X-Ratelimit-Renewalperiod-Requests:
268
+ - '60'
269
+ X-Ratelimit-Renewalperiod-Tokens:
270
+ - '60'
271
+ X-Ratelimit-Reset-Requests:
272
+ - '0'
273
+ X-Ratelimit-Reset-Tokens:
274
+ - '0'
275
+ X-Request-Id:
276
+ - 7bdf4802-aeff-4b73-81b3-888c7c164523
277
+ Server:
278
+ - APISIX
279
+ Cache-Control:
280
+ - no-cache
281
+ Transfer-Encoding:
282
+ - chunked
283
+ Connection:
284
+ - keep-alive
285
+ Date:
286
+ - Wed, 30 Sep 2026 04:44:18 GMT
287
+ Eo-Log-Uuid:
288
+ - '13980223576029350826'
289
+ Eo-Cache-Status:
290
+ - MISS
291
+ body:
292
+ encoding: UTF-8
293
+ string: |-
294
+ {
295
+ "id": "resp_023678169120b19b016abc93a31e2c8196abcb8c9cdf3ae37f",
296
+ "object": "response",
297
+ "created_at": 1790743459,
298
+ "status": "completed",
299
+ "background": false,
300
+ "completed_at": 1790743459,
301
+ "content_filters": [
302
+ {
303
+ "blocked": false,
304
+ "source_type": "prompt",
305
+ "content_filter_raw": [],
306
+ "content_filter_results": {},
307
+ "content_filter_offsets": {
308
+ "start_offset": 0,
309
+ "end_offset": 173,
310
+ "check_offset": 0
311
+ }
312
+ },
313
+ {
314
+ "blocked": false,
315
+ "source_type": "completion",
316
+ "content_filter_raw": [],
317
+ "content_filter_results": {},
318
+ "content_filter_offsets": {
319
+ "start_offset": 0,
320
+ "end_offset": 51,
321
+ "check_offset": 0
322
+ }
323
+ }
324
+ ],
325
+ "error": null,
326
+ "frequency_penalty": 0.0,
327
+ "incomplete_details": null,
328
+ "instructions": null,
329
+ "max_output_tokens": null,
330
+ "max_tool_calls": null,
331
+ "model": "openai/gpt-6-luna",
332
+ "moderation": null,
333
+ "output": [
334
+ {
335
+ "id": "msg_023678169120b19b016abc93a3b9508196951e7670849e0df9",
336
+ "type": "message",
337
+ "status": "completed",
338
+ "content": [
339
+ {
340
+ "type": "output_text",
341
+ "annotations": [],
342
+ "logprobs": [],
343
+ "text": "Berlin is currently 15\u00b0C with winds around 10 km/h."
344
+ }
345
+ ],
346
+ "phase": "final_answer",
347
+ "role": "assistant"
348
+ }
349
+ ],
350
+ "parallel_tool_calls": true,
351
+ "presence_penalty": 0.0,
352
+ "previous_response_id": null,
353
+ "prompt_cache_key": null,
354
+ "prompt_cache_retention": "24h",
355
+ "reasoning": {
356
+ "context": "all_turns",
357
+ "effort": "medium",
358
+ "mode": "standard",
359
+ "summary": null
360
+ },
361
+ "safety_identifier": null,
362
+ "service_tier": "default",
363
+ "store": false,
364
+ "temperature": 1.0,
365
+ "text": {
366
+ "format": {
367
+ "type": "text"
368
+ },
369
+ "verbosity": "medium"
370
+ },
371
+ "tool_choice": "auto",
372
+ "tool_usage": {
373
+ "image_gen": {
374
+ "input_tokens": 0,
375
+ "input_tokens_details": {
376
+ "image_tokens": 0,
377
+ "text_tokens": 0
378
+ },
379
+ "output_tokens": 0,
380
+ "output_tokens_details": {
381
+ "image_tokens": 0,
382
+ "text_tokens": 0
383
+ },
384
+ "total_tokens": 0
385
+ },
386
+ "web_search": {
387
+ "num_requests": 0
388
+ }
389
+ },
390
+ "tools": [
391
+ {
392
+ "type": "function",
393
+ "description": "Gets current weather for a location",
394
+ "name": "weather",
395
+ "output_schema": null,
396
+ "parameters": {
397
+ "type": "object",
398
+ "properties": {
399
+ "latitude": {
400
+ "type": "string",
401
+ "description": "Latitude"
402
+ },
403
+ "longitude": {
404
+ "type": "string",
405
+ "description": "Longitude"
406
+ }
407
+ },
408
+ "required": [
409
+ "latitude",
410
+ "longitude"
411
+ ],
412
+ "additionalProperties": false,
413
+ "strict": true
414
+ },
415
+ "strict": false
416
+ }
417
+ ],
418
+ "top_logprobs": 0,
419
+ "top_p": 0.98,
420
+ "truncation": "disabled",
421
+ "usage": {
422
+ "input_tokens": 132,
423
+ "input_tokens_details": {
424
+ "cache_write_tokens": 0,
425
+ "cached_tokens": 0
426
+ },
427
+ "output_tokens": 18,
428
+ "output_tokens_details": {
429
+ "reasoning_tokens": 0
430
+ },
431
+ "total_tokens": 150
432
+ },
433
+ "user": null,
434
+ "metadata": {}
435
+ }
436
+ recorded_at: Wed, 30 Sep 2026 04:44:20 GMT
437
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,221 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"openai/gpt-6-luna","input":[{"role":"user","content":"Generate
9
+ a person named John who is 30 years old"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"],"text":{"format":{"type":"json_schema","name":"response","schema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"],"additionalProperties":false},"strict":true}}}'
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
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
+ - chatptrsp-55d0e3e883354184bfe9cdf7428e4006
40
+ X-Ratelimit-Abusepenalty-Active:
41
+ - 'False'
42
+ X-Ratelimit-Key:
43
+ - gpt-6-luna
44
+ X-Ratelimit-Limit-Requests:
45
+ - '7000'
46
+ X-Ratelimit-Limit-Tokens:
47
+ - '7000000'
48
+ X-Ratelimit-Remaining-Requests:
49
+ - '6999'
50
+ X-Ratelimit-Remaining-Tokens:
51
+ - '6999988'
52
+ X-Ratelimit-Renewalperiod-Requests:
53
+ - '60'
54
+ X-Ratelimit-Renewalperiod-Tokens:
55
+ - '60'
56
+ X-Ratelimit-Reset-Requests:
57
+ - '0'
58
+ X-Ratelimit-Reset-Tokens:
59
+ - '0'
60
+ X-Request-Id:
61
+ - c1729d11-7c16-4b43-9ecf-4a5e2b6796fa
62
+ Server:
63
+ - APISIX
64
+ Cache-Control:
65
+ - no-cache
66
+ Transfer-Encoding:
67
+ - chunked
68
+ Connection:
69
+ - keep-alive
70
+ Date:
71
+ - Wed, 30 Sep 2026 04:43:52 GMT
72
+ Eo-Log-Uuid:
73
+ - '5843923290489769509'
74
+ Eo-Cache-Status:
75
+ - MISS
76
+ body:
77
+ encoding: UTF-8
78
+ string: |-
79
+ {
80
+ "id": "resp_00b1067ae4903c98016abc9389338c81938bc7c03a7c6475fa",
81
+ "object": "response",
82
+ "created_at": 1790743433,
83
+ "status": "completed",
84
+ "background": false,
85
+ "completed_at": 1790743434,
86
+ "content_filters": [
87
+ {
88
+ "blocked": false,
89
+ "source_type": "prompt",
90
+ "content_filter_raw": [],
91
+ "content_filter_results": {},
92
+ "content_filter_offsets": {
93
+ "start_offset": 0,
94
+ "end_offset": 967,
95
+ "check_offset": 0
96
+ }
97
+ },
98
+ {
99
+ "blocked": false,
100
+ "source_type": "completion",
101
+ "content_filter_raw": [],
102
+ "content_filter_results": {},
103
+ "content_filter_offsets": {
104
+ "start_offset": 0,
105
+ "end_offset": 134,
106
+ "check_offset": 0
107
+ }
108
+ }
109
+ ],
110
+ "error": null,
111
+ "frequency_penalty": 0.0,
112
+ "incomplete_details": null,
113
+ "instructions": null,
114
+ "max_output_tokens": null,
115
+ "max_tool_calls": null,
116
+ "model": "openai/gpt-6-luna",
117
+ "moderation": null,
118
+ "output": [
119
+ {
120
+ "id": "rs_00b1067ae4903c98016abc9389d43881938b44f0ebc1829e41",
121
+ "type": "reasoning",
122
+ "content": [],
123
+ "encrypted_content": "gAAAAABqvJOKxZyOVX583tGqBVB64WUpf_UnWRkhsqpOLqOnbL8jS0269cbFW8xLCjIjpJpggulY1BLNfiFSELdoxb1o2Rm-Qxe4nP0tNF-pKRY-QmHEw6ewzJ24wzSXcyMnkGvMXcMHztXs4w75RS4PU3Lr7ZoMXJYj0U7HB-4fGItkbdRnWAumGDuKw0FaPeg7a0K9U6NtOnV7qc9LuvnsFmrp4kPtVa2EF37-o3Q3ZFh4ai1Z2pvJE4xUlv6dPTxRBalRvDrojJKsuPMR45TjNXn2h8L8du-QKHeizg_SbYEpL6PRA0qx9t739Ps2ejCCboaCgfeSLcluzU_ZtWX6ufkBrDgWQdHClPALsxA0Sy-xs3WY0s16JEVcQeFHAjSOLOlQtP8ilwT2sGCtKExlpCA8MIH9ccJmhEnPih3CV310lQmLj1NsbM5JO5cafsZVGnq_oV6j0chqmRy1EQgR1uXdwWXbZzLcx1suXiwPadOGGPEDHADpjoVpIUhoxWmTWmXL7MQvTwi0yq8Zs_Ckc5EgNXjP8nKpGSe4c7nUUi-OtCsLTEGj0GvvyXXn-I771SC74ga2OLwQcC3vIArCkOVD4VXNLEWWqpZwgNs474EpvcAS36knJsrpMFrouAOGFzJB0shqhXBJr9mdG9NTF7vUL37x9cnCvbEbNXPqCWIyyrBM_2xcyRVDBeb3g3ikXn_ngiGwrhGceofzpsm_Rq_9kJrR7nb0c6itUKkkWLoC-9ZIZG9kB9FyIXp--ngfI2ciN_0t0nheFtfNClCOmtR7X9S0AEJAKRDkSGdbxi6hbJn408j-oIaiR8vyqoJxB4oiTjlEphF17v_RMfzxpdQHflv73uEF46GbYmT1cMk6ChtAGbHYNSga4PRD0MAp2qGn60TN901fe7R2lmEKXIpCZ5PDy_Vx_7USiLs2qgSwvdllZDl-1niLFKsJiJvOSSd1NLDfgAqHifBSmUlvxVK2o9XIYu5CW4JYHeVkE4NcPjXvvnsuDrxIBT_XwACvfYL7pNcLE3wJ18UNP9XUEBWBxP-5FX-MOsrpmDUbvBXA9KiXzkf3gaeI-I0hvgsxR9lPWfm22c9q-OD9LCqF6l8tnk7qEjADMp2QRWi2mMXwhDr2H42eNoLe4PF8lq5DdirOsyR0CaVCjU7LFz2u1UDplfp5YRhGYcm18TRe-CetJ7UigcYsu_eWBqX6mWJof5qA0OAvcBcmqNSRfg0r_8QThovLa8TUAb9qD940fhXK6-4EYnU=",
124
+ "summary": []
125
+ },
126
+ {
127
+ "id": "msg_00b1067ae4903c98016abc938a01688193a57273ce1b052ccc",
128
+ "type": "message",
129
+ "status": "completed",
130
+ "content": [
131
+ {
132
+ "type": "output_text",
133
+ "annotations": [],
134
+ "logprobs": [],
135
+ "text": "{\"name\":\"John\",\"age\":30}"
136
+ }
137
+ ],
138
+ "phase": "final_answer",
139
+ "role": "assistant"
140
+ }
141
+ ],
142
+ "parallel_tool_calls": true,
143
+ "presence_penalty": 0.0,
144
+ "previous_response_id": null,
145
+ "prompt_cache_key": null,
146
+ "prompt_cache_retention": "24h",
147
+ "reasoning": {
148
+ "context": "all_turns",
149
+ "effort": "medium",
150
+ "mode": "standard",
151
+ "summary": null
152
+ },
153
+ "safety_identifier": null,
154
+ "service_tier": "default",
155
+ "store": false,
156
+ "temperature": 1.0,
157
+ "text": {
158
+ "format": {
159
+ "type": "json_schema",
160
+ "description": null,
161
+ "name": "response",
162
+ "schema": {
163
+ "type": "object",
164
+ "properties": {
165
+ "name": {
166
+ "type": "string"
167
+ },
168
+ "age": {
169
+ "type": "integer"
170
+ }
171
+ },
172
+ "required": [
173
+ "name",
174
+ "age"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ "strict": true
179
+ },
180
+ "verbosity": "medium"
181
+ },
182
+ "tool_choice": "auto",
183
+ "tool_usage": {
184
+ "image_gen": {
185
+ "input_tokens": 0,
186
+ "input_tokens_details": {
187
+ "image_tokens": 0,
188
+ "text_tokens": 0
189
+ },
190
+ "output_tokens": 0,
191
+ "output_tokens_details": {
192
+ "image_tokens": 0,
193
+ "text_tokens": 0
194
+ },
195
+ "total_tokens": 0
196
+ },
197
+ "web_search": {
198
+ "num_requests": 0
199
+ }
200
+ },
201
+ "tools": [],
202
+ "top_logprobs": 0,
203
+ "top_p": 0.98,
204
+ "truncation": "disabled",
205
+ "usage": {
206
+ "input_tokens": 45,
207
+ "input_tokens_details": {
208
+ "cache_write_tokens": 0,
209
+ "cached_tokens": 0
210
+ },
211
+ "output_tokens": 42,
212
+ "output_tokens_details": {
213
+ "reasoning_tokens": 24
214
+ },
215
+ "total_tokens": 87
216
+ },
217
+ "user": null,
218
+ "metadata": {}
219
+ }
220
+ recorded_at: Wed, 30 Sep 2026 04:43:54 GMT
221
+ recorded_with: VCR 6.4.0