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,241 @@
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.6-luna","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
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-5146be65cc34429588b8f7671ff75a49
40
+ X-Ratelimit-Abusepenalty-Active:
41
+ - 'False'
42
+ X-Ratelimit-Key:
43
+ - gpt-5.6-luna
44
+ X-Ratelimit-Limit-Requests:
45
+ - '1000'
46
+ X-Ratelimit-Limit-Tokens:
47
+ - '1000000'
48
+ X-Ratelimit-Remaining-Requests:
49
+ - '999'
50
+ X-Ratelimit-Remaining-Tokens:
51
+ - '999133'
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
+ - ca15aacc-a648-44e9-a213-2df4274a9d00
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:56 GMT
72
+ Eo-Log-Uuid:
73
+ - '7982202011221161866'
74
+ Eo-Cache-Status:
75
+ - MISS
76
+ body:
77
+ encoding: UTF-8
78
+ string: |-
79
+ {
80
+ "id": "resp_0b4fef0a50514804016abc938e121c8193b4fd17f9f598ea76",
81
+ "object": "response",
82
+ "created_at": 1790743438,
83
+ "status": "completed",
84
+ "background": false,
85
+ "completed_at": 1790743438,
86
+ "content_filters": [
87
+ {
88
+ "blocked": false,
89
+ "source_type": "prompt",
90
+ "content_filter_raw": [],
91
+ "content_filter_results": {
92
+ "hate": {
93
+ "filtered": false,
94
+ "severity": "safe"
95
+ },
96
+ "sexual": {
97
+ "filtered": false,
98
+ "severity": "safe"
99
+ },
100
+ "violence": {
101
+ "filtered": false,
102
+ "severity": "safe"
103
+ },
104
+ "self_harm": {
105
+ "filtered": false,
106
+ "severity": "safe"
107
+ },
108
+ "jailbreak": {
109
+ "detected": false,
110
+ "filtered": false
111
+ }
112
+ },
113
+ "content_filter_offsets": {
114
+ "start_offset": 0,
115
+ "end_offset": 791,
116
+ "check_offset": 0
117
+ }
118
+ },
119
+ {
120
+ "blocked": false,
121
+ "source_type": "completion",
122
+ "content_filter_raw": [],
123
+ "content_filter_results": {
124
+ "protected_material_code": {
125
+ "detected": false,
126
+ "filtered": false
127
+ },
128
+ "protected_material_text": {
129
+ "detected": false,
130
+ "filtered": false
131
+ },
132
+ "hate": {
133
+ "filtered": false,
134
+ "severity": "safe"
135
+ },
136
+ "sexual": {
137
+ "filtered": false,
138
+ "severity": "safe"
139
+ },
140
+ "violence": {
141
+ "filtered": false,
142
+ "severity": "safe"
143
+ },
144
+ "self_harm": {
145
+ "filtered": false,
146
+ "severity": "safe"
147
+ }
148
+ },
149
+ "content_filter_offsets": {
150
+ "start_offset": 0,
151
+ "end_offset": 13,
152
+ "check_offset": 0
153
+ }
154
+ }
155
+ ],
156
+ "error": null,
157
+ "frequency_penalty": 0.0,
158
+ "incomplete_details": null,
159
+ "instructions": null,
160
+ "max_output_tokens": null,
161
+ "max_tool_calls": null,
162
+ "model": "openai/gpt-5.6-luna",
163
+ "moderation": null,
164
+ "output": [
165
+ {
166
+ "id": "msg_0b4fef0a50514804016abc938eb6ac819381c423eed989ae3a",
167
+ "type": "message",
168
+ "status": "completed",
169
+ "content": [
170
+ {
171
+ "type": "output_text",
172
+ "annotations": [],
173
+ "logprobs": [],
174
+ "text": "2 + 2 = **4**"
175
+ }
176
+ ],
177
+ "phase": "final_answer",
178
+ "role": "assistant"
179
+ }
180
+ ],
181
+ "parallel_tool_calls": true,
182
+ "presence_penalty": 0.0,
183
+ "previous_response_id": null,
184
+ "prompt_cache_key": null,
185
+ "prompt_cache_retention": "24h",
186
+ "reasoning": {
187
+ "context": "all_turns",
188
+ "effort": "medium",
189
+ "mode": "standard",
190
+ "summary": null
191
+ },
192
+ "safety_identifier": null,
193
+ "service_tier": "default",
194
+ "store": false,
195
+ "temperature": 1.0,
196
+ "text": {
197
+ "format": {
198
+ "type": "text"
199
+ },
200
+ "verbosity": "medium"
201
+ },
202
+ "tool_choice": "auto",
203
+ "tool_usage": {
204
+ "image_gen": {
205
+ "input_tokens": 0,
206
+ "input_tokens_details": {
207
+ "image_tokens": 0,
208
+ "text_tokens": 0
209
+ },
210
+ "output_tokens": 0,
211
+ "output_tokens_details": {
212
+ "image_tokens": 0,
213
+ "text_tokens": 0
214
+ },
215
+ "total_tokens": 0
216
+ },
217
+ "web_search": {
218
+ "num_requests": 0
219
+ }
220
+ },
221
+ "tools": [],
222
+ "top_logprobs": 0,
223
+ "top_p": 0.98,
224
+ "truncation": "disabled",
225
+ "usage": {
226
+ "input_tokens": 13,
227
+ "input_tokens_details": {
228
+ "cache_write_tokens": 0,
229
+ "cached_tokens": 0
230
+ },
231
+ "output_tokens": 12,
232
+ "output_tokens_details": {
233
+ "reasoning_tokens": 0
234
+ },
235
+ "total_tokens": 25
236
+ },
237
+ "user": null,
238
+ "metadata": {}
239
+ }
240
+ recorded_at: Wed, 30 Sep 2026 04:43:59 GMT
241
+ recorded_with: VCR 6.4.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-5.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-32ad4ad5cac4425aa708bbd9debaa690
41
+ X-Ratelimit-Abusepenalty-Active:
42
+ - 'False'
43
+ X-Ratelimit-Key:
44
+ - gpt-5.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
+ - 52a4979d-2e97-48a0-b77a-d0ac212616f9
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:20 GMT
73
+ Eo-Log-Uuid:
74
+ - '11597930358259172801'
75
+ Eo-Cache-Status:
76
+ - MISS
77
+ body:
78
+ encoding: UTF-8
79
+ string: |-
80
+ {
81
+ "id": "resp_05e249b78da7c843016abc93a4e72081908188c87ab0e1eb27",
82
+ "object": "response",
83
+ "created_at": 1790743460,
84
+ "status": "completed",
85
+ "background": false,
86
+ "completed_at": 1790743462,
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-5.6-luna",
118
+ "moderation": null,
119
+ "output": [
120
+ {
121
+ "id": "fc_05e249b78da7c843016abc93a5a754819084257580fcc0b518",
122
+ "type": "function_call",
123
+ "status": "completed",
124
+ "arguments": "{\"latitude\":\"52.5200\",\"longitude\":\"13.4050\"}",
125
+ "call_id": "call_mC9pVsuDfur71PnMKJf2guci",
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:22 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-5.6-luna","input":[{"role":"user","content":"What''s
222
+ the weather in Berlin? Use 52.5200, 13.4050."},{"type":"function_call","call_id":"call_mC9pVsuDfur71PnMKJf2guci","name":"weather","arguments":"{\"latitude\":\"52.5200\",\"longitude\":\"13.4050\"}"},{"type":"function_call_output","call_id":"call_mC9pVsuDfur71PnMKJf2guci","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-411fa7cd29414f31963ff8a8ab03bec8
255
+ X-Ratelimit-Abusepenalty-Active:
256
+ - 'False'
257
+ X-Ratelimit-Key:
258
+ - gpt-5.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
+ - 653661e5-671b-4bac-918e-05a986b4adfb
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:22 GMT
287
+ Eo-Log-Uuid:
288
+ - '14873017103264610968'
289
+ Eo-Cache-Status:
290
+ - MISS
291
+ body:
292
+ encoding: UTF-8
293
+ string: |-
294
+ {
295
+ "id": "resp_0d01f499b16aa3c9016abc93a6cff48197ad4e14aa26be8163",
296
+ "object": "response",
297
+ "created_at": 1790743462,
298
+ "status": "completed",
299
+ "background": false,
300
+ "completed_at": 1790743463,
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": 75,
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-5.6-luna",
332
+ "moderation": null,
333
+ "output": [
334
+ {
335
+ "id": "msg_0d01f499b16aa3c9016abc93a744648197b65169b0083ee02b",
336
+ "type": "message",
337
+ "status": "completed",
338
+ "content": [
339
+ {
340
+ "type": "output_text",
341
+ "annotations": [],
342
+ "logprobs": [],
343
+ "text": "The weather in 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": 23,
428
+ "output_tokens_details": {
429
+ "reasoning_tokens": 0
430
+ },
431
+ "total_tokens": 155
432
+ },
433
+ "user": null,
434
+ "metadata": {}
435
+ }
436
+ recorded_at: Wed, 30 Sep 2026 04:44:23 GMT
437
+ recorded_with: VCR 6.4.0