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,422 @@
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-5.4-mini","input":[{"role":"user","content":"Who
9
+ created the programming language Ruby?"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"]}'
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
+ - chatptrsp-0fe8acb6fc944d1092094e410a7905fb
40
+ Request-Id:
41
+ - 76dbe780-17d8-49f3-862f-fbcf4cc5c104
42
+ X-Request-Id:
43
+ - 76dbe780-17d8-49f3-862f-fbcf4cc5c104
44
+ Server:
45
+ - APISIX
46
+ Cache-Control:
47
+ - no-cache
48
+ Transfer-Encoding:
49
+ - chunked
50
+ Connection:
51
+ - keep-alive
52
+ Date:
53
+ - Mon, 28 Sep 2026 07:55:06 GMT
54
+ Eo-Log-Uuid:
55
+ - '13936715051259395835'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |-
61
+ {
62
+ "id": "resp_074fe9a0e8c8a4c1016aba1d5b1a008190ab89f5295dec8389",
63
+ "object": "response",
64
+ "created_at": 1790582107,
65
+ "status": "completed",
66
+ "background": false,
67
+ "completed_at": 1790582108,
68
+ "content_filters": [
69
+ {
70
+ "blocked": false,
71
+ "source_type": "prompt",
72
+ "content_filter_raw": [],
73
+ "content_filter_results": {
74
+ "hate": {
75
+ "filtered": false,
76
+ "severity": "safe"
77
+ },
78
+ "sexual": {
79
+ "filtered": false,
80
+ "severity": "safe"
81
+ },
82
+ "violence": {
83
+ "filtered": false,
84
+ "severity": "safe"
85
+ },
86
+ "self_harm": {
87
+ "filtered": false,
88
+ "severity": "safe"
89
+ }
90
+ },
91
+ "content_filter_offsets": {
92
+ "start_offset": 0,
93
+ "end_offset": 874,
94
+ "check_offset": 0
95
+ }
96
+ },
97
+ {
98
+ "blocked": false,
99
+ "source_type": "completion",
100
+ "content_filter_raw": [],
101
+ "content_filter_results": {
102
+ "hate": {
103
+ "filtered": false,
104
+ "severity": "safe"
105
+ },
106
+ "sexual": {
107
+ "filtered": false,
108
+ "severity": "safe"
109
+ },
110
+ "violence": {
111
+ "filtered": false,
112
+ "severity": "safe"
113
+ },
114
+ "self_harm": {
115
+ "filtered": false,
116
+ "severity": "safe"
117
+ }
118
+ },
119
+ "content_filter_offsets": {
120
+ "start_offset": 0,
121
+ "end_offset": 135,
122
+ "check_offset": 0
123
+ }
124
+ }
125
+ ],
126
+ "error": null,
127
+ "frequency_penalty": 0.0,
128
+ "incomplete_details": null,
129
+ "instructions": null,
130
+ "max_output_tokens": null,
131
+ "max_tool_calls": null,
132
+ "model": "openai/gpt-5.4-mini",
133
+ "moderation": null,
134
+ "output": [
135
+ {
136
+ "id": "msg_074fe9a0e8c8a4c1016aba1d5ba6c081908c20357c1ab224dd",
137
+ "type": "message",
138
+ "status": "completed",
139
+ "content": [
140
+ {
141
+ "type": "output_text",
142
+ "annotations": [],
143
+ "logprobs": [],
144
+ "text": "Ruby was created by **Yukihiro \u201cMatz\u201d Matsumoto**. He began developing it in the mid-1990s, and it was first released publicly in 1995."
145
+ }
146
+ ],
147
+ "phase": "final_answer",
148
+ "role": "assistant"
149
+ }
150
+ ],
151
+ "parallel_tool_calls": true,
152
+ "presence_penalty": 0.0,
153
+ "previous_response_id": null,
154
+ "prompt_cache_key": null,
155
+ "prompt_cache_retention": "in_memory",
156
+ "reasoning": {
157
+ "context": "current_turn",
158
+ "effort": "none",
159
+ "mode": "standard",
160
+ "summary": null
161
+ },
162
+ "safety_identifier": null,
163
+ "service_tier": "default",
164
+ "store": false,
165
+ "temperature": 1.0,
166
+ "text": {
167
+ "format": {
168
+ "type": "text"
169
+ },
170
+ "verbosity": "medium"
171
+ },
172
+ "tool_choice": "auto",
173
+ "tool_usage": {
174
+ "image_gen": {
175
+ "input_tokens": 0,
176
+ "input_tokens_details": {
177
+ "image_tokens": 0,
178
+ "text_tokens": 0
179
+ },
180
+ "output_tokens": 0,
181
+ "output_tokens_details": {
182
+ "image_tokens": 0,
183
+ "text_tokens": 0
184
+ },
185
+ "total_tokens": 0
186
+ },
187
+ "web_search": {
188
+ "num_requests": 0
189
+ }
190
+ },
191
+ "tools": [],
192
+ "top_logprobs": 0,
193
+ "top_p": 0.98,
194
+ "truncation": "disabled",
195
+ "usage": {
196
+ "input_tokens": 13,
197
+ "input_tokens_details": {
198
+ "cache_write_tokens": 0,
199
+ "cached_tokens": 0
200
+ },
201
+ "output_tokens": 45,
202
+ "output_tokens_details": {
203
+ "reasoning_tokens": 0
204
+ },
205
+ "total_tokens": 58
206
+ },
207
+ "user": null,
208
+ "metadata": {}
209
+ }
210
+ recorded_at: Mon, 28 Sep 2026 07:55:08 GMT
211
+ - request:
212
+ method: post
213
+ uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
214
+ body:
215
+ encoding: UTF-8
216
+ string: '{"model":"openai/gpt-5.4-mini","input":[{"role":"user","content":"Who
217
+ created the programming language Ruby?"},{"role":"assistant","content":[{"type":"output_text","text":"Ruby
218
+ was created by **Yukihiro “Matz” Matsumoto**. He began developing it in the
219
+ mid-1990s, and it was first released publicly in 1995."}]},{"role":"user","content":"What
220
+ year was Ruby first released?"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"]}'
221
+ headers:
222
+ User-Agent:
223
+ - Faraday v2.14.4
224
+ Authorization:
225
+ - Bearer <AUTH_TOKEN>
226
+ Content-Type:
227
+ - application/json
228
+ Accept-Encoding:
229
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
230
+ Accept:
231
+ - "*/*"
232
+ response:
233
+ status:
234
+ code: 200
235
+ message: OK
236
+ headers:
237
+ Content-Type:
238
+ - application/json; charset=utf-8
239
+ Access-Control-Allow-Credentials:
240
+ - 'true'
241
+ Access-Control-Allow-Headers:
242
+ - ''
243
+ Access-Control-Allow-Methods:
244
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
245
+ Access-Control-Allow-Origin:
246
+ - ''
247
+ Access-Control-Expose-Headers:
248
+ - Http_x_reqid
249
+ Http-X-Reqid:
250
+ - chatptrsp-62d4a9c994a24d2d8d2e748d4bbbb9bb
251
+ Request-Id:
252
+ - 55b57053-9a40-4187-a771-bb9d70f81db0
253
+ X-Request-Id:
254
+ - 55b57053-9a40-4187-a771-bb9d70f81db0
255
+ Server:
256
+ - APISIX
257
+ Cache-Control:
258
+ - no-cache
259
+ Transfer-Encoding:
260
+ - chunked
261
+ Connection:
262
+ - keep-alive
263
+ Date:
264
+ - Mon, 28 Sep 2026 07:55:08 GMT
265
+ Eo-Log-Uuid:
266
+ - '18283921837299043335'
267
+ Eo-Cache-Status:
268
+ - MISS
269
+ body:
270
+ encoding: UTF-8
271
+ string: |-
272
+ {
273
+ "id": "resp_0a5f176054c444f9016aba1d5df12481969af61d6f9b872403",
274
+ "object": "response",
275
+ "created_at": 1790582110,
276
+ "status": "completed",
277
+ "background": false,
278
+ "completed_at": 1790582110,
279
+ "content_filters": [
280
+ {
281
+ "blocked": false,
282
+ "source_type": "prompt",
283
+ "content_filter_raw": [],
284
+ "content_filter_results": {
285
+ "hate": {
286
+ "filtered": false,
287
+ "severity": "safe"
288
+ },
289
+ "sexual": {
290
+ "filtered": false,
291
+ "severity": "safe"
292
+ },
293
+ "violence": {
294
+ "filtered": false,
295
+ "severity": "safe"
296
+ },
297
+ "self_harm": {
298
+ "filtered": false,
299
+ "severity": "safe"
300
+ }
301
+ },
302
+ "content_filter_offsets": {
303
+ "start_offset": 0,
304
+ "end_offset": 1114,
305
+ "check_offset": 0
306
+ }
307
+ },
308
+ {
309
+ "blocked": false,
310
+ "source_type": "completion",
311
+ "content_filter_raw": [],
312
+ "content_filter_results": {
313
+ "hate": {
314
+ "filtered": false,
315
+ "severity": "safe"
316
+ },
317
+ "sexual": {
318
+ "filtered": false,
319
+ "severity": "safe"
320
+ },
321
+ "violence": {
322
+ "filtered": false,
323
+ "severity": "safe"
324
+ },
325
+ "self_harm": {
326
+ "filtered": false,
327
+ "severity": "safe"
328
+ }
329
+ },
330
+ "content_filter_offsets": {
331
+ "start_offset": 0,
332
+ "end_offset": 36,
333
+ "check_offset": 0
334
+ }
335
+ }
336
+ ],
337
+ "error": null,
338
+ "frequency_penalty": 0.0,
339
+ "incomplete_details": null,
340
+ "instructions": null,
341
+ "max_output_tokens": null,
342
+ "max_tool_calls": null,
343
+ "model": "openai/gpt-5.4-mini",
344
+ "moderation": null,
345
+ "output": [
346
+ {
347
+ "id": "msg_0a5f176054c444f9016aba1d5e8dfc8196bc3a58e15d3697fc",
348
+ "type": "message",
349
+ "status": "completed",
350
+ "content": [
351
+ {
352
+ "type": "output_text",
353
+ "annotations": [],
354
+ "logprobs": [],
355
+ "text": "Ruby was first released in **1995**."
356
+ }
357
+ ],
358
+ "phase": "final_answer",
359
+ "role": "assistant"
360
+ }
361
+ ],
362
+ "parallel_tool_calls": true,
363
+ "presence_penalty": 0.0,
364
+ "previous_response_id": null,
365
+ "prompt_cache_key": null,
366
+ "prompt_cache_retention": "in_memory",
367
+ "reasoning": {
368
+ "context": "current_turn",
369
+ "effort": "none",
370
+ "mode": "standard",
371
+ "summary": null
372
+ },
373
+ "safety_identifier": null,
374
+ "service_tier": "default",
375
+ "store": false,
376
+ "temperature": 1.0,
377
+ "text": {
378
+ "format": {
379
+ "type": "text"
380
+ },
381
+ "verbosity": "medium"
382
+ },
383
+ "tool_choice": "auto",
384
+ "tool_usage": {
385
+ "image_gen": {
386
+ "input_tokens": 0,
387
+ "input_tokens_details": {
388
+ "image_tokens": 0,
389
+ "text_tokens": 0
390
+ },
391
+ "output_tokens": 0,
392
+ "output_tokens_details": {
393
+ "image_tokens": 0,
394
+ "text_tokens": 0
395
+ },
396
+ "total_tokens": 0
397
+ },
398
+ "web_search": {
399
+ "num_requests": 0
400
+ }
401
+ },
402
+ "tools": [],
403
+ "top_logprobs": 0,
404
+ "top_p": 0.98,
405
+ "truncation": "disabled",
406
+ "usage": {
407
+ "input_tokens": 71,
408
+ "input_tokens_details": {
409
+ "cache_write_tokens": 0,
410
+ "cached_tokens": 0
411
+ },
412
+ "output_tokens": 14,
413
+ "output_tokens_details": {
414
+ "reasoning_tokens": 0
415
+ },
416
+ "total_tokens": 85
417
+ },
418
+ "user": null,
419
+ "metadata": {}
420
+ }
421
+ recorded_at: Mon, 28 Sep 2026 07:55:11 GMT
422
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,211 @@
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-5.4-mini","input":[{"role":"user","content":"What''s
9
+ 2 + 2?"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"]}'
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
+ - chatptrsp-e682c06c5171484db8d6652d474fc34a
40
+ Request-Id:
41
+ - 19e0eecd-f06c-4766-a31a-1417d40e772a
42
+ X-Request-Id:
43
+ - 19e0eecd-f06c-4766-a31a-1417d40e772a
44
+ Server:
45
+ - APISIX
46
+ Cache-Control:
47
+ - no-cache
48
+ Transfer-Encoding:
49
+ - chunked
50
+ Connection:
51
+ - keep-alive
52
+ Date:
53
+ - Mon, 28 Sep 2026 07:55:32 GMT
54
+ Eo-Log-Uuid:
55
+ - '8782904441546510134'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |-
61
+ {
62
+ "id": "resp_05ea2670e279dc05016aba1d75af7081979259e18ed1cd3c1b",
63
+ "object": "response",
64
+ "created_at": 1790582133,
65
+ "status": "completed",
66
+ "background": false,
67
+ "completed_at": 1790582134,
68
+ "content_filters": [
69
+ {
70
+ "blocked": false,
71
+ "source_type": "prompt",
72
+ "content_filter_raw": [],
73
+ "content_filter_results": {
74
+ "hate": {
75
+ "filtered": false,
76
+ "severity": "safe"
77
+ },
78
+ "sexual": {
79
+ "filtered": false,
80
+ "severity": "safe"
81
+ },
82
+ "violence": {
83
+ "filtered": false,
84
+ "severity": "safe"
85
+ },
86
+ "self_harm": {
87
+ "filtered": false,
88
+ "severity": "safe"
89
+ }
90
+ },
91
+ "content_filter_offsets": {
92
+ "start_offset": 0,
93
+ "end_offset": 845,
94
+ "check_offset": 0
95
+ }
96
+ },
97
+ {
98
+ "blocked": false,
99
+ "source_type": "completion",
100
+ "content_filter_raw": [],
101
+ "content_filter_results": {
102
+ "hate": {
103
+ "filtered": false,
104
+ "severity": "safe"
105
+ },
106
+ "sexual": {
107
+ "filtered": false,
108
+ "severity": "safe"
109
+ },
110
+ "violence": {
111
+ "filtered": false,
112
+ "severity": "safe"
113
+ },
114
+ "self_harm": {
115
+ "filtered": false,
116
+ "severity": "safe"
117
+ }
118
+ },
119
+ "content_filter_offsets": {
120
+ "start_offset": 0,
121
+ "end_offset": 9,
122
+ "check_offset": 0
123
+ }
124
+ }
125
+ ],
126
+ "error": null,
127
+ "frequency_penalty": 0.0,
128
+ "incomplete_details": null,
129
+ "instructions": null,
130
+ "max_output_tokens": null,
131
+ "max_tool_calls": null,
132
+ "model": "openai/gpt-5.4-mini",
133
+ "moderation": null,
134
+ "output": [
135
+ {
136
+ "id": "msg_05ea2670e279dc05016aba1d76518881978041f6fc3b16997a",
137
+ "type": "message",
138
+ "status": "completed",
139
+ "content": [
140
+ {
141
+ "type": "output_text",
142
+ "annotations": [],
143
+ "logprobs": [],
144
+ "text": "2 + 2 = 4"
145
+ }
146
+ ],
147
+ "phase": "final_answer",
148
+ "role": "assistant"
149
+ }
150
+ ],
151
+ "parallel_tool_calls": true,
152
+ "presence_penalty": 0.0,
153
+ "previous_response_id": null,
154
+ "prompt_cache_key": null,
155
+ "prompt_cache_retention": "in_memory",
156
+ "reasoning": {
157
+ "context": "current_turn",
158
+ "effort": "none",
159
+ "mode": "standard",
160
+ "summary": null
161
+ },
162
+ "safety_identifier": null,
163
+ "service_tier": "default",
164
+ "store": false,
165
+ "temperature": 1.0,
166
+ "text": {
167
+ "format": {
168
+ "type": "text"
169
+ },
170
+ "verbosity": "medium"
171
+ },
172
+ "tool_choice": "auto",
173
+ "tool_usage": {
174
+ "image_gen": {
175
+ "input_tokens": 0,
176
+ "input_tokens_details": {
177
+ "image_tokens": 0,
178
+ "text_tokens": 0
179
+ },
180
+ "output_tokens": 0,
181
+ "output_tokens_details": {
182
+ "image_tokens": 0,
183
+ "text_tokens": 0
184
+ },
185
+ "total_tokens": 0
186
+ },
187
+ "web_search": {
188
+ "num_requests": 0
189
+ }
190
+ },
191
+ "tools": [],
192
+ "top_logprobs": 0,
193
+ "top_p": 0.98,
194
+ "truncation": "disabled",
195
+ "usage": {
196
+ "input_tokens": 13,
197
+ "input_tokens_details": {
198
+ "cache_write_tokens": 0,
199
+ "cached_tokens": 0
200
+ },
201
+ "output_tokens": 11,
202
+ "output_tokens_details": {
203
+ "reasoning_tokens": 0
204
+ },
205
+ "total_tokens": 24
206
+ },
207
+ "user": null,
208
+ "metadata": {}
209
+ }
210
+ recorded_at: Mon, 28 Sep 2026 07:55:35 GMT
211
+ recorded_with: VCR 6.4.0