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,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
9
+ is the capital of France?"}],"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-01e97c2a74ea4288989b08bda58aa225
40
+ Request-Id:
41
+ - 258bdda6-ade3-49a9-8b01-38d11a82483a
42
+ X-Request-Id:
43
+ - 258bdda6-ade3-49a9-8b01-38d11a82483a
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:02 GMT
54
+ Eo-Log-Uuid:
55
+ - '18129220125982412644'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |-
61
+ {
62
+ "id": "resp_020189cfebd738ad016aba1d5786bc81948bb69485812502c3",
63
+ "object": "response",
64
+ "created_at": 1790582103,
65
+ "status": "completed",
66
+ "background": false,
67
+ "completed_at": 1790582104,
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": 862,
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": 35,
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_020189cfebd738ad016aba1d5814ec8194ad82b35d70bd2527",
137
+ "type": "message",
138
+ "status": "completed",
139
+ "content": [
140
+ {
141
+ "type": "output_text",
142
+ "annotations": [],
143
+ "logprobs": [],
144
+ "text": "The capital of France is **Paris**."
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": 13,
202
+ "output_tokens_details": {
203
+ "reasoning_tokens": 0
204
+ },
205
+ "total_tokens": 26
206
+ },
207
+ "user": null,
208
+ "metadata": {}
209
+ }
210
+ recorded_at: Mon, 28 Sep 2026 07:55:04 GMT
211
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,102 @@
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":"Count
9
+ from 1 to 3"}],"stream":true,"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
+ - text/event-stream
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-6e681d4ff64d4f648e0209c36e258038
40
+ Request-Id:
41
+ - 581e7931-2ea5-470a-a05e-9efb84a7227b
42
+ X-Request-Id:
43
+ - 581e7931-2ea5-470a-a05e-9efb84a7227b
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:50:30 GMT
54
+ Eo-Log-Uuid:
55
+ - '2348368129771514598'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |+
61
+ event: response.created
62
+ data: {"type":"response.created","response":{"id":"resp_0711f6cb58cd6e48016aba1c478c5081969b10733e7c68d15d","object":"response","created_at":1790581831,"status":"in_progress","background":false,"completed_at":null,"content_filters":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"openai/gpt-5.4-mini","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"in_memory","reasoning":{"context":"current_turn","effort":"none","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":false,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":0}
63
+
64
+ event: response.in_progress
65
+ data: {"type":"response.in_progress","response":{"id":"resp_0711f6cb58cd6e48016aba1c478c5081969b10733e7c68d15d","object":"response","created_at":1790581831,"status":"in_progress","background":false,"completed_at":null,"content_filters":null,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"openai/gpt-5.4-mini","moderation":null,"output":[],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"in_memory","reasoning":{"context":"current_turn","effort":"none","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"auto","store":false,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":null,"user":null,"metadata":{}},"sequence_number":1}
66
+
67
+ event: response.output_item.added
68
+ data: {"type":"response.output_item.added","item":{"id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","type":"message","status":"in_progress","content":[],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":2}
69
+
70
+ event: response.content_part.added
71
+ data: {"type":"response.content_part.added","content_index":0,"item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""},"sequence_number":3}
72
+
73
+ event: response.output_text.delta
74
+ data: {"type":"response.output_text.delta","content_index":0,"delta":"1","item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","logprobs":[],"obfuscation":"T3pfDBnbCHThVr0","output_index":0,"sequence_number":4}
75
+
76
+ event: response.output_text.delta
77
+ data: {"type":"response.output_text.delta","content_index":0,"delta":" \n","item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","logprobs":[],"obfuscation":"gJAj14VLbABMR","output_index":0,"sequence_number":5}
78
+
79
+ event: response.output_text.delta
80
+ data: {"type":"response.output_text.delta","content_index":0,"delta":"2","item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","logprobs":[],"obfuscation":"noETGRDKE3tUQW4","output_index":0,"sequence_number":6}
81
+
82
+ event: response.output_text.delta
83
+ data: {"type":"response.output_text.delta","content_index":0,"delta":" \n","item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","logprobs":[],"obfuscation":"8WwU0eQ4N7o6D","output_index":0,"sequence_number":7}
84
+
85
+ event: response.output_text.delta
86
+ data: {"type":"response.output_text.delta","content_index":0,"delta":"3","item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","logprobs":[],"obfuscation":"jZSfDtmwTLovdnk","output_index":0,"sequence_number":8}
87
+
88
+ event: response.output_text.done
89
+ data: {"type":"response.output_text.done","content_index":0,"item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","logprobs":[],"output_index":0,"sequence_number":9,"text":"1 \n2 \n3"}
90
+
91
+ event: response.content_part.done
92
+ data: {"type":"response.content_part.done","content_index":0,"item_id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","output_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"1 \n2 \n3"},"sequence_number":10}
93
+
94
+ event: response.output_item.done
95
+ data: {"type":"response.output_item.done","item":{"id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"1 \n2 \n3"}],"phase":"final_answer","role":"assistant"},"output_index":0,"sequence_number":11}
96
+
97
+ event: response.completed
98
+ data: {"type":"response.completed","response":{"id":"resp_0711f6cb58cd6e48016aba1c478c5081969b10733e7c68d15d","object":"response","created_at":1790581831,"status":"completed","background":false,"completed_at":1790581832,"content_filters":[{"blocked":false,"source_type":"prompt","content_filter_raw":[],"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"}},"content_filter_offsets":{"start_offset":0,"end_offset":849,"check_offset":0}},{"blocked":false,"source_type":"completion","content_filter_raw":[],"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"}},"content_filter_offsets":{"start_offset":0,"end_offset":9,"check_offset":0}}],"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"openai/gpt-5.4-mini","moderation":null,"output":[{"id":"msg_0711f6cb58cd6e48016aba1c487cf08196a38e5c0ac697455b","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"1 \n2 \n3"}],"phase":"final_answer","role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":"in_memory","reasoning":{"context":"current_turn","effort":"none","mode":"standard","summary":null},"safety_identifier":null,"service_tier":"default","store":false,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tool_usage":{"image_gen":{"input_tokens":0,"input_tokens_details":{"image_tokens":0,"text_tokens":0},"output_tokens":0,"output_tokens_details":{"image_tokens":0,"text_tokens":0},"total_tokens":0},"web_search":{"num_requests":0}},"tools":[],"top_logprobs":0,"top_p":0.98,"truncation":"disabled","usage":{"input_tokens":13,"input_tokens_details":{"cache_write_tokens":0,"cached_tokens":0},"output_tokens":9,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":22},"user":null,"metadata":{}},"sequence_number":12}
99
+
100
+ recorded_at: Mon, 28 Sep 2026 07:50:33 GMT
101
+ recorded_with: VCR 6.4.0
102
+ ...
@@ -0,0 +1,230 @@
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":"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; 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-8fad9bf8e99f4280a5bb353629cb0831
40
+ Request-Id:
41
+ - 225c2672-941c-420c-b044-06be6b80852b
42
+ X-Request-Id:
43
+ - 225c2672-941c-420c-b044-06be6b80852b
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:52:41 GMT
54
+ Eo-Log-Uuid:
55
+ - '10499161404009481196'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |-
61
+ {
62
+ "id": "resp_03d431adb9569459016aba1cca2500819790138e09e9f3f9e1",
63
+ "object": "response",
64
+ "created_at": 1790581962,
65
+ "status": "completed",
66
+ "background": false,
67
+ "completed_at": 1790581963,
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": 1021,
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": 24,
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_03d431adb9569459016aba1ccad8008197a3c27432d3c337ee",
137
+ "type": "message",
138
+ "status": "completed",
139
+ "content": [
140
+ {
141
+ "type": "output_text",
142
+ "annotations": [],
143
+ "logprobs": [],
144
+ "text": "{\"name\":\"John\",\"age\":30}"
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": "json_schema",
169
+ "description": null,
170
+ "name": "response",
171
+ "schema": {
172
+ "type": "object",
173
+ "properties": {
174
+ "name": {
175
+ "type": "string"
176
+ },
177
+ "age": {
178
+ "type": "integer"
179
+ }
180
+ },
181
+ "required": [
182
+ "name",
183
+ "age"
184
+ ],
185
+ "additionalProperties": false
186
+ },
187
+ "strict": true
188
+ },
189
+ "verbosity": "medium"
190
+ },
191
+ "tool_choice": "auto",
192
+ "tool_usage": {
193
+ "image_gen": {
194
+ "input_tokens": 0,
195
+ "input_tokens_details": {
196
+ "image_tokens": 0,
197
+ "text_tokens": 0
198
+ },
199
+ "output_tokens": 0,
200
+ "output_tokens_details": {
201
+ "image_tokens": 0,
202
+ "text_tokens": 0
203
+ },
204
+ "total_tokens": 0
205
+ },
206
+ "web_search": {
207
+ "num_requests": 0
208
+ }
209
+ },
210
+ "tools": [],
211
+ "top_logprobs": 0,
212
+ "top_p": 0.98,
213
+ "truncation": "disabled",
214
+ "usage": {
215
+ "input_tokens": 45,
216
+ "input_tokens_details": {
217
+ "cache_write_tokens": 0,
218
+ "cached_tokens": 0
219
+ },
220
+ "output_tokens": 16,
221
+ "output_tokens_details": {
222
+ "reasoning_tokens": 0
223
+ },
224
+ "total_tokens": 61
225
+ },
226
+ "user": null,
227
+ "metadata": {}
228
+ }
229
+ recorded_at: Mon, 28 Sep 2026 07:52:43 GMT
230
+ recorded_with: VCR 6.4.0