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,127 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"Who
9
+ created the programming language Ruby?"}],"stream":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
+ - chatcmpl-436dc00d531e4e44959df0b1a7fb13b0
40
+ Server:
41
+ - APISIX
42
+ Content-Length:
43
+ - '749'
44
+ Connection:
45
+ - keep-alive
46
+ Date:
47
+ - Mon, 28 Sep 2026 07:55:13 GMT
48
+ Eo-Log-Uuid:
49
+ - '8782473544896471672'
50
+ Eo-Cache-Status:
51
+ - MISS
52
+ body:
53
+ encoding: UTF-8
54
+ string: '{"id":"chatcmpl-436dc00d531e4e44959df0b1a7fb13b0","object":"chat.completion","created":1790582113,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"Ruby
55
+ was created by **Yukihiro Matsumoto**, commonly known as **Matz**. He began
56
+ developing it in the early 1990s and released the first public version in
57
+ **1995**.","reasoning_content":"We need answer. User asks: Who created programming
58
+ language Ruby? Answer: Yukihiro Matsumoto, often called Matz. Created in 1995
59
+ in Japan. Need concise. Could mention. Ensure no extra."},"finish_reason":"stop"}],"usage":{"prompt_tokens":37,"completion_tokens":88,"total_tokens":125,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":45}}}'
60
+ recorded_at: Mon, 28 Sep 2026 07:55:14 GMT
61
+ - request:
62
+ method: post
63
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
64
+ body:
65
+ encoding: UTF-8
66
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"Who
67
+ created the programming language Ruby?"},{"role":"assistant","content":"Ruby
68
+ was created by **Yukihiro Matsumoto**, commonly known as **Matz**. He began
69
+ developing it in the early 1990s and released the first public version in
70
+ **1995**.","reasoning":"We need answer. User asks: Who created programming
71
+ language Ruby? Answer: Yukihiro Matsumoto, often called Matz. Created in 1995
72
+ in Japan. Need concise. Could mention. Ensure no extra.","reasoning_content":"We
73
+ need answer. User asks: Who created programming language Ruby? Answer: Yukihiro
74
+ Matsumoto, often called Matz. Created in 1995 in Japan. Need concise. Could
75
+ mention. Ensure no extra."},{"role":"user","content":"What year was Ruby first
76
+ released?"}],"stream":false}'
77
+ headers:
78
+ User-Agent:
79
+ - Faraday v2.14.4
80
+ Authorization:
81
+ - Bearer <AUTH_TOKEN>
82
+ Content-Type:
83
+ - application/json
84
+ Accept-Encoding:
85
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
86
+ Accept:
87
+ - "*/*"
88
+ response:
89
+ status:
90
+ code: 200
91
+ message: OK
92
+ headers:
93
+ Content-Type:
94
+ - application/json; charset=utf-8
95
+ Access-Control-Allow-Credentials:
96
+ - 'true'
97
+ Access-Control-Allow-Headers:
98
+ - ''
99
+ Access-Control-Allow-Methods:
100
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
101
+ Access-Control-Allow-Origin:
102
+ - ''
103
+ Access-Control-Expose-Headers:
104
+ - Http_x_reqid
105
+ Http-X-Reqid:
106
+ - chatcmpl-28551f82227f43d99d121b32877b4b71
107
+ Server:
108
+ - APISIX
109
+ Content-Length:
110
+ - '690'
111
+ Connection:
112
+ - keep-alive
113
+ Date:
114
+ - Mon, 28 Sep 2026 07:55:14 GMT
115
+ Eo-Log-Uuid:
116
+ - '2337283624055827832'
117
+ Eo-Cache-Status:
118
+ - MISS
119
+ body:
120
+ encoding: UTF-8
121
+ string: '{"id":"chatcmpl-28551f82227f43d99d121b32877b4b71","object":"chat.completion","created":1790582114,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"Ruby
122
+ was first released in **1995**.","reasoning_content":"We need answer. Previous
123
+ assistant said first public version 1995. User asks What year was Ruby first
124
+ released? Answer 1995. Need concise. Ensure no confusion: Ruby first released
125
+ in 1995 (Ruby 0.95? December 1995). Could mention created by Matz. final."},"finish_reason":"stop"}],"usage":{"prompt_tokens":90,"completion_tokens":73,"total_tokens":163,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":63}}}'
126
+ recorded_at: Mon, 28 Sep 2026 07:55:17 GMT
127
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"What''s
9
+ 2 + 2?"}],"stream":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
+ - chatcmpl-1bb7c8870eaa4db4ba4a9351cafacab5
40
+ Server:
41
+ - APISIX
42
+ Content-Length:
43
+ - '462'
44
+ Connection:
45
+ - keep-alive
46
+ Date:
47
+ - Mon, 28 Sep 2026 07:55:04 GMT
48
+ Eo-Log-Uuid:
49
+ - '5317532361321073268'
50
+ Eo-Cache-Status:
51
+ - MISS
52
+ body:
53
+ encoding: UTF-8
54
+ string: '{"id":"chatcmpl-1bb7c8870eaa4db4ba4a9351cafacab5","object":"chat.completion","created":1790582104,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"2
55
+ + 2 = 4","reasoning_content":"We need answer simple. Need not overdo. Final
56
+ answer."},"finish_reason":"stop"}],"usage":{"prompt_tokens":38,"completion_tokens":21,"total_tokens":59,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":13}}}'
57
+ recorded_at: Mon, 28 Sep 2026 07:55:06 GMT
58
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,119 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"What''s
9
+ the weather in Berlin? Use 52.5200, 13.4050."}],"stream":false,"tools":[{"type":"function","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}}}]}'
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; charset=utf-8
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
+ - chatcmpl-ac69ea0edf4742eba008ea5cf53d8e0f
41
+ Server:
42
+ - APISIX
43
+ Content-Length:
44
+ - '728'
45
+ Connection:
46
+ - keep-alive
47
+ Date:
48
+ - Mon, 28 Sep 2026 08:15:30 GMT
49
+ Eo-Log-Uuid:
50
+ - '44681797609371094'
51
+ Eo-Cache-Status:
52
+ - MISS
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"id":"chatcmpl-ac69ea0edf4742eba008ea5cf53d8e0f","object":"chat.completion","created":1790583330,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"I''ll
56
+ check the current weather in Berlin for you.","tool_calls":[{"index":0,"type":"function","id":"call_00_lvuhgau5olak8ey3lt97bhez","function":{"name":"weather","arguments":"{\"latitude\":
57
+ \"52.5200\", \"longitude\": \"13.4050\"}"}}],"reasoning_content":"The user
58
+ wants weather in Berlin. Let me call the weather tool with those coordinates."},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":341,"completion_tokens":87,"total_tokens":428,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":17}}}'
59
+ recorded_at: Mon, 28 Sep 2026 08:15:34 GMT
60
+ - request:
61
+ method: post
62
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
63
+ body:
64
+ encoding: UTF-8
65
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"What''s
66
+ the weather in Berlin? Use 52.5200, 13.4050."},{"role":"assistant","content":"I''ll
67
+ check the current weather in Berlin for you.","tool_calls":[{"id":"call_00_lvuhgau5olak8ey3lt97bhez","type":"function","function":{"name":"weather","arguments":"{\"latitude\":\"52.5200\",\"longitude\":\"13.4050\"}"}}],"reasoning":"The
68
+ user wants weather in Berlin. Let me call the weather tool with those coordinates.","reasoning_content":"The
69
+ user wants weather in Berlin. Let me call the weather tool with those coordinates."},{"role":"tool","content":"Current
70
+ weather at 52.5200, 13.4050: 15°C, Wind: 10 km/h","tool_call_id":"call_00_lvuhgau5olak8ey3lt97bhez"}],"stream":false,"tools":[{"type":"function","function":{"name":"weather","description":"Gets
71
+ 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}}}]}'
72
+ headers:
73
+ User-Agent:
74
+ - Faraday v2.14.4
75
+ Authorization:
76
+ - Bearer <AUTH_TOKEN>
77
+ Content-Type:
78
+ - application/json
79
+ Accept-Encoding:
80
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
81
+ Accept:
82
+ - "*/*"
83
+ response:
84
+ status:
85
+ code: 200
86
+ message: OK
87
+ headers:
88
+ Content-Type:
89
+ - application/json; charset=utf-8
90
+ Access-Control-Allow-Credentials:
91
+ - 'true'
92
+ Access-Control-Allow-Headers:
93
+ - ''
94
+ Access-Control-Allow-Methods:
95
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
96
+ Access-Control-Allow-Origin:
97
+ - ''
98
+ Access-Control-Expose-Headers:
99
+ - Http_x_reqid
100
+ Http-X-Reqid:
101
+ - chatcmpl-366f9e7ce35e4a3e863fb565a1551eaa
102
+ Server:
103
+ - APISIX
104
+ Content-Length:
105
+ - '898'
106
+ Connection:
107
+ - keep-alive
108
+ Date:
109
+ - Mon, 28 Sep 2026 08:15:34 GMT
110
+ Eo-Log-Uuid:
111
+ - '18006083621634436192'
112
+ Eo-Cache-Status:
113
+ - MISS
114
+ body:
115
+ encoding: ASCII-8BIT
116
+ string: !binary |-
117
+ eyJpZCI6ImNoYXRjbXBsLTM2NmY5ZTdjZTM1ZTRhM2U4NjNmYjU2NWExNTUxZWFhIiwib2JqZWN0IjoiY2hhdC5jb21wbGV0aW9uIiwiY3JlYXRlZCI6MTc5MDU4MzMzNCwibW9kZWwiOiJkZWVwc2Vlay9kZWVwc2Vlay12NC4xLWZsYXNoIiwiY2hvaWNlcyI6W3siaW5kZXgiOjAsIm1lc3NhZ2UiOnsicm9sZSI6ImFzc2lzdGFudCIsImNvbnRlbnQiOiJIZXJlJ3MgdGhlIGN1cnJlbnQgd2VhdGhlciBpbiBCZXJsaW4gKDUyLjUyMDAsIDEzLjQwNTApOlxuXG4tICoqVGVtcGVyYXR1cmU6KiogMTXCsEMgKDU5wrBGKVxuLSAqKldpbmQ6KiogMTAga20vaFxuXG5JdCdzIGEgZmFpcmx5IG1pbGQgZGF5IGluIEJlcmxpbiDigJQgMTXCsEMgaXMgY29tZm9ydGFibGUgd2VhdGhlci4gWW91IG1pZ2h0IHdhbnQgYSBsaWdodCBqYWNrZXQsIGVzcGVjaWFsbHkgc2luY2UgdGhlcmUncyBhIGdlbnRsZSBicmVlemUgYXQgMTAga20vaC4gTm90ZSB0aGF0IHRoZSByZXBvcnQgZG9lc24ndCBpbmNsdWRlIGNvbmRpdGlvbnMgbGlrZSBjbG91ZCBjb3ZlciBvciBwcmVjaXBpdGF0aW9uLCBzbyBpZiB5b3UncmUgaGVhZGluZyBvdXQsIGl0IG1heSBiZSB3b3J0aCBkb3VibGUtY2hlY2tpbmcgZm9yIHJhaW4gc2VwYXJhdGVseS4iLCJyZWFzb25pbmdfY29udGVudCI6IlRoZSB0b29sIHJldHVybmVkIHJlc3VsdHMuIExldCBtZSBwcmVzZW50IHRoZW0uIn0sImZpbmlzaF9yZWFzb24iOiJzdG9wIn1dLCJ1c2FnZSI6eyJwcm9tcHRfdG9rZW5zIjo0NjYsImNvbXBsZXRpb25fdG9rZW5zIjoxMjEsInRvdGFsX3Rva2VucyI6NTg3LCJwcm9tcHRfdG9rZW5zX2RldGFpbHMiOnsiY2FjaGVkX3Rva2VucyI6MjU2fSwiY29tcGxldGlvbl90b2tlbnNfZGV0YWlscyI6eyJyZWFzb25pbmdfdG9rZW5zIjoxMH19fQ==
118
+ recorded_at: Mon, 28 Sep 2026 08:15:36 GMT
119
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,59 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"Generate
9
+ a person named John who is 30 years old"}],"stream":false,"response_format":{"type":"json_schema","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
+ - chatcmpl-6067e5a97a1547ec9513fc70e93dd847
40
+ Server:
41
+ - APISIX
42
+ Content-Length:
43
+ - '640'
44
+ Connection:
45
+ - keep-alive
46
+ Date:
47
+ - Mon, 28 Sep 2026 07:53:19 GMT
48
+ Eo-Log-Uuid:
49
+ - '2930380493192510607'
50
+ Eo-Cache-Status:
51
+ - MISS
52
+ body:
53
+ encoding: UTF-8
54
+ string: '{"id":"chatcmpl-6067e5a97a1547ec9513fc70e93dd847","object":"chat.completion","created":1790581999,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"{\"name\":\"John\",\"age\":30}","reasoning_content":"The
55
+ user wants me to generate a person named John who is 30 years old. I should
56
+ return the final answer in the required JSON structure.\n\nLet me call the
57
+ structured output tool with the person''s information."},"finish_reason":"stop"}],"usage":{"prompt_tokens":312,"completion_tokens":98,"total_tokens":410,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":42}}}'
58
+ recorded_at: Mon, 28 Sep 2026 07:53:22 GMT
59
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"What
9
+ is the capital of France?"}],"stream":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
+ - chatcmpl-d8f42b3c6fdb4b57b4c6bf2aa396db11
40
+ Server:
41
+ - APISIX
42
+ Content-Length:
43
+ - '499'
44
+ Connection:
45
+ - keep-alive
46
+ Date:
47
+ - Mon, 28 Sep 2026 07:55:11 GMT
48
+ Eo-Log-Uuid:
49
+ - '18145898680502344866'
50
+ Eo-Cache-Status:
51
+ - MISS
52
+ body:
53
+ encoding: UTF-8
54
+ string: '{"id":"chatcmpl-d8f42b3c6fdb4b57b4c6bf2aa396db11","object":"chat.completion","created":1790582111,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"message":{"role":"assistant","content":"The
55
+ capital of France is **Paris**.","reasoning_content":"We need answer simple.
56
+ Capital of France is Paris. Need concise."},"finish_reason":"stop"}],"usage":{"prompt_tokens":37,"completion_tokens":23,"total_tokens":60,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":14}}}'
57
+ recorded_at: Mon, 28 Sep 2026 07:55:12 GMT
58
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/v1/chat/completions"
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"Count
9
+ from 1 to 3"}],"stream":true,"stream_options":{"include_usage":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
+ - 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
+ - chatcmpl-d72665fc52394f6f84ea246579724256
40
+ Server:
41
+ - APISIX
42
+ Cache-Control:
43
+ - no-cache
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - keep-alive
48
+ Date:
49
+ - Mon, 28 Sep 2026 07:50:39 GMT
50
+ Eo-Log-Uuid:
51
+ - '7939177778517733346'
52
+ Eo-Cache-Status:
53
+ - MISS
54
+ body:
55
+ encoding: UTF-8
56
+ string: |+
57
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}
58
+
59
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":"We"},"finish_reason":null}]}
60
+
61
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":" need answer simple. Need count"},"finish_reason":null}]}
62
+
63
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":" "},"finish_reason":null}]}
64
+
65
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":"1 to 3. \""},"finish_reason":null}]}
66
+
67
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":"1, 2, "},"finish_reason":null}]}
68
+
69
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":"3\". Ensure maybe"},"finish_reason":null}]}
70
+
71
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":" no extra"},"finish_reason":null}]}
72
+
73
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":"."},"finish_reason":null}]}
74
+
75
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":"1"},"finish_reason":null}]}
76
+
77
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":", 2, 3"},"finish_reason":null}]}
78
+
79
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}
80
+
81
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"content":""},"finish_reason":null}]}
82
+
83
+ data: {"id":"chatcmpl-d72665fc52394f6f84ea246579724256","object":"chat.completion.chunk","created":1790581839,"model":"deepseek/deepseek-v4.1-flash","choices":[{"index":0,"delta":{"content":""},"finish_reason":"stop"}],"usage":{"prompt_tokens":37,"completion_tokens":35,"total_tokens":72,"prompt_tokens_details":{},"completion_tokens_details":{"reasoning_tokens":27}}}
84
+
85
+ data: [DONE]
86
+
87
+ recorded_at: Mon, 28 Sep 2026 07:50:40 GMT
88
+ recorded_with: VCR 6.4.0
89
+ ...