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,98 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/google/gemini-3.8-flash:generateContent"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"Generate a person named
9
+ John who is 30 years old"}]}],"generationConfig":{"responseMimeType":"application/json","responseJsonSchema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"],"additionalProperties":false}}}'
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
+ - chatptvtx-01fb3f220fe14f8fbd74c0fd47557090
40
+ X-Request-Id:
41
+ - chatptvtx-01fb3f220fe14f8fbd74c0fd47557090
42
+ Server:
43
+ - APISIX
44
+ Cache-Control:
45
+ - no-cache
46
+ Content-Length:
47
+ - '1904'
48
+ Connection:
49
+ - keep-alive
50
+ Date:
51
+ - Mon, 28 Sep 2026 07:52:43 GMT
52
+ Eo-Log-Uuid:
53
+ - '10180700154429289515'
54
+ Eo-Cache-Status:
55
+ - MISS
56
+ body:
57
+ encoding: UTF-8
58
+ string: |
59
+ {
60
+ "candidates": [
61
+ {
62
+ "content": {
63
+ "role": "model",
64
+ "parts": [
65
+ {
66
+ "text": "{\"name\":\"John\",\"age\":30}",
67
+ "thoughtSignature": "AY89a1/sbwVhhtrglAkwK1ACj0PV4cI9gha9/zBIF4Im7NxGgw3955I0f7pN90vKBC000M9LLTvxShKF0zttSutDyaEkhAhjA1BO+nVz2V//wAT33TEVxDfGYkTZLq77D6Kjqy/HFCzAahKJ4PMBCX1wVuAW7c/CUyWdS4jg4do0zEB8ID6v/YmhmXKkq0mVBZvSJi5VqWcycuHht32Din4wJIBFu032esDjvDVltFjM8PxC7zvXo7kBZ0b/bAoEX1FEVk4XA8Z+d6YaqEz5gCaaHxojQKUKmQJnEYn8CCf34ahaTXo5sYwhgUGglIZmismo1YFUcxON9GLYsSmzdwz5jxPdZg85+4mczRQ+GMo99AKEzAZawYDjctuaA190mu0o/kLL9b1INA9t0wp5NXU5gyVZn8opxvMtoRxn8wVHhIY3fb9Nxnf/LFpouYiHgKXHt3txOgFz2V2DdpTM77vKzeAkuhw5Zbo73PV8a8WwZjQ2VdU2Ev4nmQAIPJ9TsqwSk6hGKfolA0Z133kZIrbNBm0Mb78aHV1l3cvW0mW2GvbALct8GyCdajblqb92QzT4oddtXfbXj0kUJMNbG4GGvosH3uXV23OS5aciHi3hyUhky+pQIbNV5Z4jKDCJn7CjhKD3GBQGoz8ebjoFtMMMWeJGnhdIh2dK/3n9BlZEVA8C3UqqiwuSz2tDQO4bsnKRJ0dZQ++QSTx4Br3u/3TJJJxeAqCv27ueli3T32drP2ltDJLgbgf3rQuNw5W+G3cLtKWPZUUcpcDV2UhTpz43pHg9zJC8WDYqD6tVNNI3XRIRuOhUe7T2nH7UdlF3xvC8Un2pq6JliniwfhBGNWegtkfT/MEwMmcy7Os/Ghc3BSRucod0Z6G17vbIJu6wvoDjFNTDupVYYp9BIJJQSDenQwIujofExmt5o9+O9vw89IMcF59TsaG7yiYDGEytcKVxeY2l7pUEF4Sqy//YCPVbW2cfJgf4+izwjLyOPLCTO3WIs0SHtou6Fm4SqfnxHfELnSb3Rjx+iwEQMVTwug3xpajteZMgvXsSyDTlxI2O44TIncy6B4CJZ6xt8uf82CyUj12aRPkrmJ+73gdSTWz8S3ewEKJWkjCd"
68
+ }
69
+ ]
70
+ },
71
+ "finishReason": "STOP"
72
+ }
73
+ ],
74
+ "usageMetadata": {
75
+ "promptTokenCount": 77,
76
+ "candidatesTokenCount": 10,
77
+ "totalTokenCount": 318,
78
+ "trafficType": "ON_DEMAND",
79
+ "promptTokensDetails": [
80
+ {
81
+ "modality": "TEXT",
82
+ "tokenCount": 77
83
+ }
84
+ ],
85
+ "candidatesTokensDetails": [
86
+ {
87
+ "modality": "TEXT",
88
+ "tokenCount": 10
89
+ }
90
+ ],
91
+ "thoughtsTokenCount": 231
92
+ },
93
+ "modelVersion": "gemini-3.8-flash",
94
+ "createTime": "2026-09-28T07:52:44.334224Z",
95
+ "responseId": "zBy6apCzFPGfpucPhpfeuQ0"
96
+ }
97
+ recorded_at: Mon, 28 Sep 2026 07:52:47 GMT
98
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,98 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/google/gemini-3.8-flash:generateContent"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"What is the capital of
9
+ France?"}]}],"generationConfig":{}}'
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
+ - chatptvtx-1c35b0e7e8ff4d6ab7cdcb827dab30e8
40
+ X-Request-Id:
41
+ - chatptvtx-1c35b0e7e8ff4d6ab7cdcb827dab30e8
42
+ Server:
43
+ - APISIX
44
+ Cache-Control:
45
+ - no-cache
46
+ Content-Length:
47
+ - '1219'
48
+ Connection:
49
+ - keep-alive
50
+ Date:
51
+ - Mon, 28 Sep 2026 07:54:36 GMT
52
+ Eo-Log-Uuid:
53
+ - '9362007643665641951'
54
+ Eo-Cache-Status:
55
+ - MISS
56
+ body:
57
+ encoding: UTF-8
58
+ string: |
59
+ {
60
+ "candidates": [
61
+ {
62
+ "content": {
63
+ "role": "model",
64
+ "parts": [
65
+ {
66
+ "text": "The capital of France is **Paris**.",
67
+ "thoughtSignature": "AY89a18/xIwtkXn0FUqG22Y5+tEwkWHakqCra3o8gg/+1g2w81zEHP3IqFzmO1X23pXYG3W9dwjrwjYj8/vLEUPpGnEBO6Gorr/ajSZDthmrNjs8rgL+JH0VOFblcRtHhRJwXvZS4b2mJ8cM4a/Sh3B//0JsBVWhy+KIDIdD26PKMCxxYQO9Pmj1XbYaTr47UsnYCPq8wH3e+Rqtkl0+RtOoxk3/NwoqT/PU8NRmudgR3xzlPwnH/2YmwKPxfl/oiyFM5OmE2bHuxGNBP/uT2tk2+6FUlNW8xJKR3WH9vE0756P5mU9CDAHCQueEo3rIRQc+Slmfzity8JpHqRtjNDpVd6E38ypzGuq27GqgHAuq9alQIcCH7Wsgd/PTg+Go3MdsWcq76gzUvhABnyZ5/d5kTMWeBUtOxBFA5jZf9s7J/UEeSL0iZlE="
68
+ }
69
+ ]
70
+ },
71
+ "finishReason": "STOP"
72
+ }
73
+ ],
74
+ "usageMetadata": {
75
+ "promptTokenCount": 7,
76
+ "candidatesTokenCount": 8,
77
+ "totalTokenCount": 72,
78
+ "trafficType": "ON_DEMAND",
79
+ "promptTokensDetails": [
80
+ {
81
+ "modality": "TEXT",
82
+ "tokenCount": 7
83
+ }
84
+ ],
85
+ "candidatesTokensDetails": [
86
+ {
87
+ "modality": "TEXT",
88
+ "tokenCount": 8
89
+ }
90
+ ],
91
+ "thoughtsTokenCount": 57
92
+ },
93
+ "modelVersion": "gemini-3.8-flash",
94
+ "createTime": "2026-09-28T07:54:37.429051Z",
95
+ "responseId": "PR26avuXGo-epucP1f7t6AY"
96
+ }
97
+ recorded_at: Mon, 28 Sep 2026 07:54:39 GMT
98
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,71 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/google/gemini-3.8-flash:streamGenerateContent?alt=sse"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"contents":[{"role":"user","parts":[{"text":"Count from 1 to 3"}]}],"generationConfig":{}}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v2.14.4
12
+ Authorization:
13
+ - Bearer <AUTH_TOKEN>
14
+ Content-Type:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - text/event-stream
27
+ Access-Control-Allow-Credentials:
28
+ - 'true'
29
+ Access-Control-Allow-Headers:
30
+ - ''
31
+ Access-Control-Allow-Methods:
32
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - ''
35
+ Access-Control-Expose-Headers:
36
+ - Http_x_reqid
37
+ Content-Disposition:
38
+ - attachment
39
+ Http-X-Reqid:
40
+ - chatptvtx-9dd12f95133a4928be16a600e02de91d
41
+ X-Request-Id:
42
+ - chatptvtx-9dd12f95133a4928be16a600e02de91d
43
+ Server:
44
+ - APISIX
45
+ Cache-Control:
46
+ - no-cache
47
+ Transfer-Encoding:
48
+ - chunked
49
+ Connection:
50
+ - keep-alive
51
+ Date:
52
+ - Mon, 28 Sep 2026 07:50:40 GMT
53
+ Eo-Log-Uuid:
54
+ - '14544320406573213641'
55
+ Eo-Cache-Status:
56
+ - MISS
57
+ body:
58
+ encoding: UTF-8
59
+ string: "data: {\"candidates\": [{\"content\": {\"role\": \"model\",\"parts\":
60
+ [{\"text\": \"1, 2, 3\"}]}}],\"usageMetadata\": {\"trafficType\": \"ON_DEMAND\"},\"modelVersion\":
61
+ \"gemini-3.8-flash\",\"createTime\": \"2026-09-28T07:50:41.659437Z\",\"responseId\":
62
+ \"URy6au2fKI-epucP1f7t6AY\"}\r\n\r\ndata: {\"candidates\": [{\"content\":
63
+ {\"role\": \"model\",\"parts\": [{\"text\": \"\",\"thoughtSignature\": \"AY89a199dJH54nbhLQXK+JRKRICd7DM78XvfSkId30ycrqrX6OrX/EeQVlSmGzw3oS1hTmoxz8fhTU1isl18jCsP26k964pEscaptNYXkwqGyoGSZZFOAuppNiBQk1w5AcJa/1EQCmqhiPoEpkUxqwN5tO0BhFc7yN8+70xBXhsIuzKqEg1oVFRTEFSAuqpLyncLBDiB49QCuKh9ClVKFsemxZf8/UyiINIW8al6i5IeSPi0Snb9227WiaRq2DJEbTsV0XX0lJpF0IiT20xcJODrGikx4V5XO8bwKKRkmxalmCEr1WKN3JEZB/nEpSv2Eoup38eytfB2F6MTg1EuGQnDfnmVrytVaZgJXSpllqXUUe2vA6TE+TUpClTWNphJQ9xZnUnkFy4SudcVTQ921nsHiYXTV53CoblYANE7WUv5A9/KZYqNVODnyVt/OktOHGHaHGwpwJuhg0T1ZqKMLhlBGGNK3NiPrEvVfW8iZHUhdbyFtsyInxz6XEKDp8bUNBpRGleCw1t6ireQywT3j0Cb6vo6I49O/gTfHoBcicaFm+BUj8lhHw5ICBlMTZmrheNa0DVBw7OCer18D3zO1KApVVX21Jgj0Hki+dTrAnH3AQHnJDqMv8tqCflF548ARse6OpVuzNvtcmuCYWjNSRO1yhAHS8kY1piQ+Q2OJowJS5yh9LtwLEYSVw==\"}]},\"finishReason\":
64
+ \"STOP\"}],\"usageMetadata\": {\"promptTokenCount\": 7,\"candidatesTokenCount\":
65
+ 7,\"totalTokenCount\": 121,\"trafficType\": \"ON_DEMAND\",\"promptTokensDetails\":
66
+ [{\"modality\": \"TEXT\",\"tokenCount\": 7}],\"candidatesTokensDetails\":
67
+ [{\"modality\": \"TEXT\",\"tokenCount\": 7}],\"thoughtsTokenCount\": 107},\"modelVersion\":
68
+ \"gemini-3.8-flash\",\"createTime\": \"2026-09-28T07:50:41.659437Z\",\"responseId\":
69
+ \"URy6au2fKI-epucP1f7t6AY\"}\r\n\r\n"
70
+ recorded_at: Mon, 28 Sep 2026 07:50:43 GMT
71
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,419 @@
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.2","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-a51b228749f5497192f1ac3661874513
40
+ Request-Id:
41
+ - 1d3aadb6-90e4-4e18-89d2-ac18433bf54f
42
+ X-Request-Id:
43
+ - 1d3aadb6-90e4-4e18-89d2-ac18433bf54f
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:42 GMT
54
+ Eo-Log-Uuid:
55
+ - '10899749308924042592'
56
+ Eo-Cache-Status:
57
+ - MISS
58
+ body:
59
+ encoding: UTF-8
60
+ string: |-
61
+ {
62
+ "id": "resp_049bba04297c6a17016aba1d43982c81978537369885a92d75",
63
+ "object": "response",
64
+ "created_at": 1790582083,
65
+ "status": "completed",
66
+ "background": false,
67
+ "completed_at": 1790582084,
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": 1474,
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": 67,
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.2",
133
+ "moderation": null,
134
+ "output": [
135
+ {
136
+ "id": "msg_049bba04297c6a17016aba1d4430408197a2ee075538e023a1",
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** in the mid-1990s."
145
+ }
146
+ ],
147
+ "role": "assistant"
148
+ }
149
+ ],
150
+ "parallel_tool_calls": true,
151
+ "presence_penalty": 0.0,
152
+ "previous_response_id": null,
153
+ "prompt_cache_key": null,
154
+ "prompt_cache_retention": "in_memory",
155
+ "reasoning": {
156
+ "context": "current_turn",
157
+ "effort": "none",
158
+ "mode": "standard",
159
+ "summary": null
160
+ },
161
+ "safety_identifier": null,
162
+ "service_tier": "default",
163
+ "store": false,
164
+ "temperature": 1.0,
165
+ "text": {
166
+ "format": {
167
+ "type": "text"
168
+ },
169
+ "verbosity": "medium"
170
+ },
171
+ "tool_choice": "auto",
172
+ "tool_usage": {
173
+ "image_gen": {
174
+ "input_tokens": 0,
175
+ "input_tokens_details": {
176
+ "image_tokens": 0,
177
+ "text_tokens": 0
178
+ },
179
+ "output_tokens": 0,
180
+ "output_tokens_details": {
181
+ "image_tokens": 0,
182
+ "text_tokens": 0
183
+ },
184
+ "total_tokens": 0
185
+ },
186
+ "web_search": {
187
+ "num_requests": 0
188
+ }
189
+ },
190
+ "tools": [],
191
+ "top_logprobs": 0,
192
+ "top_p": 0.98,
193
+ "truncation": "disabled",
194
+ "usage": {
195
+ "input_tokens": 13,
196
+ "input_tokens_details": {
197
+ "cache_write_tokens": 0,
198
+ "cached_tokens": 0
199
+ },
200
+ "output_tokens": 29,
201
+ "output_tokens_details": {
202
+ "reasoning_tokens": 0
203
+ },
204
+ "total_tokens": 42
205
+ },
206
+ "user": null,
207
+ "metadata": {}
208
+ }
209
+ recorded_at: Mon, 28 Sep 2026 07:54:45 GMT
210
+ - request:
211
+ method: post
212
+ uri: "<QINIU_BASE_URL>/bypass/openai/v1/responses"
213
+ body:
214
+ encoding: UTF-8
215
+ string: '{"model":"openai/gpt-5.2","input":[{"role":"user","content":"Who created
216
+ the programming language Ruby?"},{"role":"assistant","content":[{"type":"output_text","text":"Ruby
217
+ was created by **Yukihiro “Matz” Matsumoto** in the mid-1990s."}]},{"role":"user","content":"What
218
+ year was Ruby first released?"}],"stream":false,"store":false,"include":["reasoning.encrypted_content"]}'
219
+ headers:
220
+ User-Agent:
221
+ - Faraday v2.14.4
222
+ Authorization:
223
+ - Bearer <AUTH_TOKEN>
224
+ Content-Type:
225
+ - application/json
226
+ Accept-Encoding:
227
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
228
+ Accept:
229
+ - "*/*"
230
+ response:
231
+ status:
232
+ code: 200
233
+ message: OK
234
+ headers:
235
+ Content-Type:
236
+ - application/json; charset=utf-8
237
+ Access-Control-Allow-Credentials:
238
+ - 'true'
239
+ Access-Control-Allow-Headers:
240
+ - ''
241
+ Access-Control-Allow-Methods:
242
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
243
+ Access-Control-Allow-Origin:
244
+ - ''
245
+ Access-Control-Expose-Headers:
246
+ - Http_x_reqid
247
+ Http-X-Reqid:
248
+ - chatptrsp-3ccd5904789d400fa404f54d533efe67
249
+ Request-Id:
250
+ - 872d994e-e6fb-40ed-bda2-60fcdb29e168
251
+ X-Request-Id:
252
+ - 872d994e-e6fb-40ed-bda2-60fcdb29e168
253
+ Server:
254
+ - APISIX
255
+ Cache-Control:
256
+ - no-cache
257
+ Transfer-Encoding:
258
+ - chunked
259
+ Connection:
260
+ - keep-alive
261
+ Date:
262
+ - Mon, 28 Sep 2026 07:54:45 GMT
263
+ Eo-Log-Uuid:
264
+ - '6709871395884012194'
265
+ Eo-Cache-Status:
266
+ - MISS
267
+ body:
268
+ encoding: UTF-8
269
+ string: |-
270
+ {
271
+ "id": "resp_021013ea0d5fe838016aba1d469f5c8196926fbfa1b0839aaa",
272
+ "object": "response",
273
+ "created_at": 1790582086,
274
+ "status": "completed",
275
+ "background": false,
276
+ "completed_at": 1790582087,
277
+ "content_filters": [
278
+ {
279
+ "blocked": false,
280
+ "source_type": "prompt",
281
+ "content_filter_raw": [],
282
+ "content_filter_results": {
283
+ "hate": {
284
+ "filtered": false,
285
+ "severity": "safe"
286
+ },
287
+ "sexual": {
288
+ "filtered": false,
289
+ "severity": "safe"
290
+ },
291
+ "violence": {
292
+ "filtered": false,
293
+ "severity": "safe"
294
+ },
295
+ "self_harm": {
296
+ "filtered": false,
297
+ "severity": "safe"
298
+ }
299
+ },
300
+ "content_filter_offsets": {
301
+ "start_offset": 0,
302
+ "end_offset": 1646,
303
+ "check_offset": 0
304
+ }
305
+ },
306
+ {
307
+ "blocked": false,
308
+ "source_type": "completion",
309
+ "content_filter_raw": [],
310
+ "content_filter_results": {
311
+ "hate": {
312
+ "filtered": false,
313
+ "severity": "safe"
314
+ },
315
+ "sexual": {
316
+ "filtered": false,
317
+ "severity": "safe"
318
+ },
319
+ "violence": {
320
+ "filtered": false,
321
+ "severity": "safe"
322
+ },
323
+ "self_harm": {
324
+ "filtered": false,
325
+ "severity": "safe"
326
+ }
327
+ },
328
+ "content_filter_offsets": {
329
+ "start_offset": 0,
330
+ "end_offset": 84,
331
+ "check_offset": 0
332
+ }
333
+ }
334
+ ],
335
+ "error": null,
336
+ "frequency_penalty": 0.0,
337
+ "incomplete_details": null,
338
+ "instructions": null,
339
+ "max_output_tokens": null,
340
+ "max_tool_calls": null,
341
+ "model": "openai/gpt-5.2",
342
+ "moderation": null,
343
+ "output": [
344
+ {
345
+ "id": "msg_021013ea0d5fe838016aba1d4735688196a17dd1d615c3dfee",
346
+ "type": "message",
347
+ "status": "completed",
348
+ "content": [
349
+ {
350
+ "type": "output_text",
351
+ "annotations": [],
352
+ "logprobs": [],
353
+ "text": "Ruby was first released in **1995** (initial public release: **December 21, 1995**)."
354
+ }
355
+ ],
356
+ "role": "assistant"
357
+ }
358
+ ],
359
+ "parallel_tool_calls": true,
360
+ "presence_penalty": 0.0,
361
+ "previous_response_id": null,
362
+ "prompt_cache_key": null,
363
+ "prompt_cache_retention": "in_memory",
364
+ "reasoning": {
365
+ "context": "current_turn",
366
+ "effort": "none",
367
+ "mode": "standard",
368
+ "summary": null
369
+ },
370
+ "safety_identifier": null,
371
+ "service_tier": "default",
372
+ "store": false,
373
+ "temperature": 1.0,
374
+ "text": {
375
+ "format": {
376
+ "type": "text"
377
+ },
378
+ "verbosity": "medium"
379
+ },
380
+ "tool_choice": "auto",
381
+ "tool_usage": {
382
+ "image_gen": {
383
+ "input_tokens": 0,
384
+ "input_tokens_details": {
385
+ "image_tokens": 0,
386
+ "text_tokens": 0
387
+ },
388
+ "output_tokens": 0,
389
+ "output_tokens_details": {
390
+ "image_tokens": 0,
391
+ "text_tokens": 0
392
+ },
393
+ "total_tokens": 0
394
+ },
395
+ "web_search": {
396
+ "num_requests": 0
397
+ }
398
+ },
399
+ "tools": [],
400
+ "top_logprobs": 0,
401
+ "top_p": 0.98,
402
+ "truncation": "disabled",
403
+ "usage": {
404
+ "input_tokens": 55,
405
+ "input_tokens_details": {
406
+ "cache_write_tokens": 0,
407
+ "cached_tokens": 0
408
+ },
409
+ "output_tokens": 28,
410
+ "output_tokens_details": {
411
+ "reasoning_tokens": 0
412
+ },
413
+ "total_tokens": 83
414
+ },
415
+ "user": null,
416
+ "metadata": {}
417
+ }
418
+ recorded_at: Mon, 28 Sep 2026 07:54:48 GMT
419
+ recorded_with: VCR 6.4.0