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,421 @@
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","input":[{"role":"user","content":"Who created
9
+ 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-1d52efd4e4634bc2a92ecd6d5285d73e
40
+ Request-Id:
41
+ - 407175f1-3cd0-4c1a-82fa-2ef466d78227
42
+ X-Request-Id:
43
+ - 407175f1-3cd0-4c1a-82fa-2ef466d78227
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:54:31 GMT
54
+ Eo-Log-Uuid:
55
+ - '13307043536448912936'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |-
61
+ {
62
+ "id": "resp_07b2818919db4da6016aba1d38d5988195831219c717eb96e5",
63
+ "object": "response",
64
+ "created_at": 1790582072,
65
+ "status": "completed",
66
+ "background": false,
67
+ "completed_at": 1790582073,
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": 78,
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",
133
+ "moderation": null,
134
+ "output": [
135
+ {
136
+ "id": "msg_07b2818919db4da6016aba1d395a688195a81aa968892a5a5a",
137
+ "type": "message",
138
+ "status": "completed",
139
+ "content": [
140
+ {
141
+ "type": "output_text",
142
+ "annotations": [],
143
+ "logprobs": [],
144
+ "text": "Ruby was created by **Yukihiro Matsumoto**, who is commonly known as **Matz**."
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": 27,
202
+ "output_tokens_details": {
203
+ "reasoning_tokens": 0
204
+ },
205
+ "total_tokens": 40
206
+ },
207
+ "user": null,
208
+ "metadata": {}
209
+ }
210
+ recorded_at: Mon, 28 Sep 2026 07:54:34 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","input":[{"role":"user","content":"Who created
217
+ the programming language Ruby?"},{"role":"assistant","content":[{"type":"output_text","text":"Ruby
218
+ was created by **Yukihiro Matsumoto**, who is commonly known as **Matz**."}]},{"role":"user","content":"What
219
+ year was Ruby first released?"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"]}'
220
+ headers:
221
+ User-Agent:
222
+ - Faraday v2.14.4
223
+ Authorization:
224
+ - Bearer <AUTH_TOKEN>
225
+ Content-Type:
226
+ - application/json
227
+ Accept-Encoding:
228
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
229
+ Accept:
230
+ - "*/*"
231
+ response:
232
+ status:
233
+ code: 200
234
+ message: OK
235
+ headers:
236
+ Content-Type:
237
+ - application/json; charset=utf-8
238
+ Access-Control-Allow-Credentials:
239
+ - 'true'
240
+ Access-Control-Allow-Headers:
241
+ - ''
242
+ Access-Control-Allow-Methods:
243
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
244
+ Access-Control-Allow-Origin:
245
+ - ''
246
+ Access-Control-Expose-Headers:
247
+ - Http_x_reqid
248
+ Http-X-Reqid:
249
+ - chatptrsp-ea72d4a51a0e45f09faa0af12325fb82
250
+ Request-Id:
251
+ - acad20e7-51dd-4435-bace-1e5c9a1a4cb8
252
+ X-Request-Id:
253
+ - acad20e7-51dd-4435-bace-1e5c9a1a4cb8
254
+ Server:
255
+ - APISIX
256
+ Cache-Control:
257
+ - no-cache
258
+ Transfer-Encoding:
259
+ - chunked
260
+ Connection:
261
+ - keep-alive
262
+ Date:
263
+ - Mon, 28 Sep 2026 07:54:34 GMT
264
+ Eo-Log-Uuid:
265
+ - '4255640009719311680'
266
+ Eo-Cache-Status:
267
+ - MISS
268
+ body:
269
+ encoding: UTF-8
270
+ string: |-
271
+ {
272
+ "id": "resp_0481dd6a55a4ac38016aba1d3b676081938f7edb770d7e8a6b",
273
+ "object": "response",
274
+ "created_at": 1790582075,
275
+ "status": "completed",
276
+ "background": false,
277
+ "completed_at": 1790582076,
278
+ "content_filters": [
279
+ {
280
+ "blocked": false,
281
+ "source_type": "prompt",
282
+ "content_filter_raw": [],
283
+ "content_filter_results": {
284
+ "hate": {
285
+ "filtered": false,
286
+ "severity": "safe"
287
+ },
288
+ "sexual": {
289
+ "filtered": false,
290
+ "severity": "safe"
291
+ },
292
+ "violence": {
293
+ "filtered": false,
294
+ "severity": "safe"
295
+ },
296
+ "self_harm": {
297
+ "filtered": false,
298
+ "severity": "safe"
299
+ }
300
+ },
301
+ "content_filter_offsets": {
302
+ "start_offset": 0,
303
+ "end_offset": 1057,
304
+ "check_offset": 0
305
+ }
306
+ },
307
+ {
308
+ "blocked": false,
309
+ "source_type": "completion",
310
+ "content_filter_raw": [],
311
+ "content_filter_results": {
312
+ "hate": {
313
+ "filtered": false,
314
+ "severity": "safe"
315
+ },
316
+ "sexual": {
317
+ "filtered": false,
318
+ "severity": "safe"
319
+ },
320
+ "violence": {
321
+ "filtered": false,
322
+ "severity": "safe"
323
+ },
324
+ "self_harm": {
325
+ "filtered": false,
326
+ "severity": "safe"
327
+ }
328
+ },
329
+ "content_filter_offsets": {
330
+ "start_offset": 0,
331
+ "end_offset": 36,
332
+ "check_offset": 0
333
+ }
334
+ }
335
+ ],
336
+ "error": null,
337
+ "frequency_penalty": 0.0,
338
+ "incomplete_details": null,
339
+ "instructions": null,
340
+ "max_output_tokens": null,
341
+ "max_tool_calls": null,
342
+ "model": "openai/gpt-5.4",
343
+ "moderation": null,
344
+ "output": [
345
+ {
346
+ "id": "msg_0481dd6a55a4ac38016aba1d3bed3c8193a8361b38daa51b71",
347
+ "type": "message",
348
+ "status": "completed",
349
+ "content": [
350
+ {
351
+ "type": "output_text",
352
+ "annotations": [],
353
+ "logprobs": [],
354
+ "text": "Ruby was first released in **1995**."
355
+ }
356
+ ],
357
+ "phase": "final_answer",
358
+ "role": "assistant"
359
+ }
360
+ ],
361
+ "parallel_tool_calls": true,
362
+ "presence_penalty": 0.0,
363
+ "previous_response_id": null,
364
+ "prompt_cache_key": null,
365
+ "prompt_cache_retention": "in_memory",
366
+ "reasoning": {
367
+ "context": "current_turn",
368
+ "effort": "none",
369
+ "mode": "standard",
370
+ "summary": null
371
+ },
372
+ "safety_identifier": null,
373
+ "service_tier": "default",
374
+ "store": false,
375
+ "temperature": 1.0,
376
+ "text": {
377
+ "format": {
378
+ "type": "text"
379
+ },
380
+ "verbosity": "medium"
381
+ },
382
+ "tool_choice": "auto",
383
+ "tool_usage": {
384
+ "image_gen": {
385
+ "input_tokens": 0,
386
+ "input_tokens_details": {
387
+ "image_tokens": 0,
388
+ "text_tokens": 0
389
+ },
390
+ "output_tokens": 0,
391
+ "output_tokens_details": {
392
+ "image_tokens": 0,
393
+ "text_tokens": 0
394
+ },
395
+ "total_tokens": 0
396
+ },
397
+ "web_search": {
398
+ "num_requests": 0
399
+ }
400
+ },
401
+ "tools": [],
402
+ "top_logprobs": 0,
403
+ "top_p": 0.98,
404
+ "truncation": "disabled",
405
+ "usage": {
406
+ "input_tokens": 53,
407
+ "input_tokens_details": {
408
+ "cache_write_tokens": 0,
409
+ "cached_tokens": 0
410
+ },
411
+ "output_tokens": 14,
412
+ "output_tokens_details": {
413
+ "reasoning_tokens": 0
414
+ },
415
+ "total_tokens": 67
416
+ },
417
+ "user": null,
418
+ "metadata": {}
419
+ }
420
+ recorded_at: Mon, 28 Sep 2026 07:54:36 GMT
421
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,157 @@
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","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-a7a211aa0d7842139726464d019636d3
40
+ Request-Id:
41
+ - 8c84bffc-98a8-9510-968c-363716c1eb5b
42
+ X-Request-Id:
43
+ - 8c84bffc-98a8-9510-968c-363716c1eb5b
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:54:51 GMT
54
+ Eo-Log-Uuid:
55
+ - '7859432970295987026'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |-
61
+ {
62
+ "id": "resp_05bbf9d1b3185ed3016aba1d4c791887d0b72d5b8e43a3ca8b",
63
+ "object": "response",
64
+ "created_at": 1790582092,
65
+ "status": "completed",
66
+ "access_programs": null,
67
+ "background": false,
68
+ "billing": {
69
+ "payer": "developer"
70
+ },
71
+ "completed_at": 1790582092,
72
+ "error": null,
73
+ "frequency_penalty": 0.0,
74
+ "incomplete_details": null,
75
+ "instructions": null,
76
+ "max_output_tokens": null,
77
+ "max_tool_calls": null,
78
+ "model": "openai/gpt-5.4",
79
+ "moderation": null,
80
+ "output": [
81
+ {
82
+ "id": "msg_05bbf9d1b3185ed3016aba1d4cedd887d08d1130ac454d5251",
83
+ "type": "message",
84
+ "status": "completed",
85
+ "content": [
86
+ {
87
+ "type": "output_text",
88
+ "annotations": [],
89
+ "logprobs": [],
90
+ "text": "4"
91
+ }
92
+ ],
93
+ "phase": "final_answer",
94
+ "role": "assistant"
95
+ }
96
+ ],
97
+ "parallel_tool_calls": true,
98
+ "presence_penalty": 0.0,
99
+ "previous_response_id": null,
100
+ "prompt_cache_key": null,
101
+ "prompt_cache_retention": "24h",
102
+ "reasoning": {
103
+ "context": "current_turn",
104
+ "effort": "none",
105
+ "mode": "standard",
106
+ "summary": null
107
+ },
108
+ "safety_identifier": null,
109
+ "service_tier": "default",
110
+ "store": false,
111
+ "temperature": 1.0,
112
+ "text": {
113
+ "format": {
114
+ "type": "text"
115
+ },
116
+ "verbosity": "medium"
117
+ },
118
+ "tool_choice": "auto",
119
+ "tool_usage": {
120
+ "image_gen": {
121
+ "input_tokens": 0,
122
+ "input_tokens_details": {
123
+ "image_tokens": 0,
124
+ "text_tokens": 0
125
+ },
126
+ "output_tokens": 0,
127
+ "output_tokens_details": {
128
+ "image_tokens": 0,
129
+ "text_tokens": 0
130
+ },
131
+ "total_tokens": 0
132
+ },
133
+ "web_search": {
134
+ "num_requests": 0
135
+ }
136
+ },
137
+ "tools": [],
138
+ "top_logprobs": 0,
139
+ "top_p": 0.98,
140
+ "truncation": "disabled",
141
+ "usage": {
142
+ "input_tokens": 13,
143
+ "input_tokens_details": {
144
+ "cache_write_tokens": 0,
145
+ "cached_tokens": 0
146
+ },
147
+ "output_tokens": 5,
148
+ "output_tokens_details": {
149
+ "reasoning_tokens": 0
150
+ },
151
+ "total_tokens": 18
152
+ },
153
+ "user": null,
154
+ "metadata": {}
155
+ }
156
+ recorded_at: Mon, 28 Sep 2026 07:54:53 GMT
157
+ recorded_with: VCR 6.4.0