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,97 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/google/gemini-3.1-flash-lite: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-0087aff3f8414fcc813cca1c05efd7b4
40
+ X-Request-Id:
41
+ - chatptvtx-0087aff3f8414fcc813cca1c05efd7b4
42
+ Server:
43
+ - APISIX
44
+ Cache-Control:
45
+ - no-cache
46
+ Content-Length:
47
+ - '870'
48
+ Connection:
49
+ - keep-alive
50
+ Date:
51
+ - Mon, 28 Sep 2026 07:55:17 GMT
52
+ Eo-Log-Uuid:
53
+ - '3975034066735735665'
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": "AY89a1+ZfA0nm4ZvaZ+DlPwtjTnvYWk1j13niR7eJH53ZEyJYeBHNDiuog+ybosV9x9OSaxOA3m8G8eT6Spd8wvAusr8CUv4ls3hWbRVv8Uag4lpTxCPGd35"
68
+ }
69
+ ]
70
+ },
71
+ "finishReason": "STOP"
72
+ }
73
+ ],
74
+ "usageMetadata": {
75
+ "promptTokenCount": 7,
76
+ "candidatesTokenCount": 7,
77
+ "totalTokenCount": 14,
78
+ "trafficType": "ON_DEMAND",
79
+ "promptTokensDetails": [
80
+ {
81
+ "modality": "TEXT",
82
+ "tokenCount": 7
83
+ }
84
+ ],
85
+ "candidatesTokensDetails": [
86
+ {
87
+ "modality": "TEXT",
88
+ "tokenCount": 7
89
+ }
90
+ ]
91
+ },
92
+ "modelVersion": "gemini-3.1-flash-lite",
93
+ "createTime": "2026-09-28T07:55:17.993970Z",
94
+ "responseId": "ZR26arLVPM6Z9LsPmsX6yA8"
95
+ }
96
+ recorded_at: Mon, 28 Sep 2026 07:55:19 GMT
97
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,70 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/google/gemini-3.1-flash-lite: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-a4e1d8073ce74618b9d41ae3d7e207fb
41
+ X-Request-Id:
42
+ - chatptvtx-a4e1d8073ce74618b9d41ae3d7e207fb
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:33 GMT
53
+ Eo-Log-Uuid:
54
+ - '4807657444808488809'
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.1-flash-lite\",\"createTime\": \"2026-09-28T07:50:34.077746Z\",\"responseId\":
62
+ \"Shy6arLfBKepq8YPl_mXoQo\"}\r\n\r\ndata: {\"candidates\": [{\"content\":
63
+ {\"role\": \"model\",\"parts\": [{\"text\": \"\",\"thoughtSignature\": \"AY89a18e72YUFPbhaehZMpI92BQofnntj52mU5XWIE8iKmdZBh2lo9ZjH0rzKp45WRNCiP2njUfUrqwLKoJuS4E/4Ol3qpS63N62/VFT39+yEtRU/nhU1nhC\"}]},\"finishReason\":
64
+ \"STOP\"}],\"usageMetadata\": {\"promptTokenCount\": 7,\"candidatesTokenCount\":
65
+ 7,\"totalTokenCount\": 14,\"trafficType\": \"ON_DEMAND\",\"promptTokensDetails\":
66
+ [{\"modality\": \"TEXT\",\"tokenCount\": 7}],\"candidatesTokensDetails\":
67
+ [{\"modality\": \"TEXT\",\"tokenCount\": 7}]},\"modelVersion\": \"gemini-3.1-flash-lite\",\"createTime\":
68
+ \"2026-09-28T07:50:34.077746Z\",\"responseId\": \"Shy6arLfBKepq8YPl_mXoQo\"}\r\n\r\n"
69
+ recorded_at: Mon, 28 Sep 2026 07:50:34 GMT
70
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,199 @@
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":"Who created the programming
9
+ language Ruby?"}]}],"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-f0e6c3bcf13647f689080c82cc46a709
40
+ X-Request-Id:
41
+ - chatptvtx-f0e6c3bcf13647f689080c82cc46a709
42
+ Server:
43
+ - APISIX
44
+ Cache-Control:
45
+ - no-cache
46
+ Content-Length:
47
+ - '1831'
48
+ Connection:
49
+ - keep-alive
50
+ Date:
51
+ - Mon, 28 Sep 2026 07:56:45 GMT
52
+ Eo-Log-Uuid:
53
+ - '14253892859785085432'
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 programming language Ruby was created by **Yukihiro Matsumoto** (often referred to as **\"Matz\"**). \n\nHe began developing the language in 1993, and it was officially released to the public in 1995. Matsumoto's goal was to create a true object-oriented language that made programmers happy and emphasized human needs over computer needs.",
67
+ "thoughtSignature": "AY89a18MwRbVxdY5+wg6S8r3OzC2sH899JYbplxp7ACunmhId2PHn66YNwhYJzWZRtMRyOHPiRxspqM4Pi/SIprcCaNs1mB6y1JogBlWP+/wC5YCtMRNzXzRl3Wfumwjrr1gCVxieFy3C6AnAEFBaImDu4wkq46K8myoa/Ak4cpi/FuNvWvdrSh7OekyJUcN24wkl6I70TFLBRqHrxDTz4vMjy5shbnBYwPZiv/KqQ8slJ8uTwmJZxdzEOXyonq5To5xDAM6w7ZsgO4vljRZtnZpRtfxABaHKY8CyTerhZXamRqFvKaxtCwKo/BXfQTuanP48db0xMXTN9L35CUTtohoENwzHJFTzzGW4PCSu9XgmF3TOv82ONrY+zBZKwZvNBmqgfZFKbGhdVA4d0qywFJ8uPbsS5EQ1QqzRt1OkmBuSzLJxp9BwI60f0TA8YZELzdJSlaHYt3ccjNfId5yoPpxsy5hkbgspxWVEreMzNpyioYdbX/TQElFzAtcRFYNFWEvS6RPW6Y0KU4BL/6K41SUgTWIdaa2ZfdCg9pkPTeMAaMQbK9XQIPaHSJX7tDudejyP5le/xD15ZYmGIBGPaErKDYTXEq6EBbA1w+/XYr+FVOVYsZ7aD6kwyRk1HhyL/FHR/GvXM1sYeLzVMlPJA8EJ23vKgFv5tbMa2y9qsnVKPaolrUuAA5Mg6eiT4RtrKTe4fFd2M59fWYX2lBKo4SBnGx5DEd2ifdG"
68
+ }
69
+ ]
70
+ },
71
+ "finishReason": "STOP"
72
+ }
73
+ ],
74
+ "usageMetadata": {
75
+ "promptTokenCount": 7,
76
+ "candidatesTokenCount": 79,
77
+ "totalTokenCount": 209,
78
+ "trafficType": "ON_DEMAND",
79
+ "promptTokensDetails": [
80
+ {
81
+ "modality": "TEXT",
82
+ "tokenCount": 7
83
+ }
84
+ ],
85
+ "candidatesTokensDetails": [
86
+ {
87
+ "modality": "TEXT",
88
+ "tokenCount": 79
89
+ }
90
+ ],
91
+ "thoughtsTokenCount": 123
92
+ },
93
+ "modelVersion": "gemini-3.8-flash",
94
+ "createTime": "2026-09-28T07:56:46.062908Z",
95
+ "responseId": "vh26arzrA76bpucPwvej0Ac"
96
+ }
97
+ recorded_at: Mon, 28 Sep 2026 07:56:48 GMT
98
+ - request:
99
+ method: post
100
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/google/gemini-3.8-flash:generateContent"
101
+ body:
102
+ encoding: UTF-8
103
+ string: '{"contents":[{"role":"user","parts":[{"text":"Who created the programming
104
+ language Ruby?"}]},{"role":"model","parts":[{"thought":true,"thoughtSignature":"AY89a18MwRbVxdY5+wg6S8r3OzC2sH899JYbplxp7ACunmhId2PHn66YNwhYJzWZRtMRyOHPiRxspqM4Pi/SIprcCaNs1mB6y1JogBlWP+/wC5YCtMRNzXzRl3Wfumwjrr1gCVxieFy3C6AnAEFBaImDu4wkq46K8myoa/Ak4cpi/FuNvWvdrSh7OekyJUcN24wkl6I70TFLBRqHrxDTz4vMjy5shbnBYwPZiv/KqQ8slJ8uTwmJZxdzEOXyonq5To5xDAM6w7ZsgO4vljRZtnZpRtfxABaHKY8CyTerhZXamRqFvKaxtCwKo/BXfQTuanP48db0xMXTN9L35CUTtohoENwzHJFTzzGW4PCSu9XgmF3TOv82ONrY+zBZKwZvNBmqgfZFKbGhdVA4d0qywFJ8uPbsS5EQ1QqzRt1OkmBuSzLJxp9BwI60f0TA8YZELzdJSlaHYt3ccjNfId5yoPpxsy5hkbgspxWVEreMzNpyioYdbX/TQElFzAtcRFYNFWEvS6RPW6Y0KU4BL/6K41SUgTWIdaa2ZfdCg9pkPTeMAaMQbK9XQIPaHSJX7tDudejyP5le/xD15ZYmGIBGPaErKDYTXEq6EBbA1w+/XYr+FVOVYsZ7aD6kwyRk1HhyL/FHR/GvXM1sYeLzVMlPJA8EJ23vKgFv5tbMa2y9qsnVKPaolrUuAA5Mg6eiT4RtrKTe4fFd2M59fWYX2lBKo4SBnGx5DEd2ifdG"},{"text":"The
105
+ programming language Ruby was created by **Yukihiro Matsumoto** (often referred
106
+ to as **\"Matz\"**). \n\nHe began developing the language in 1993, and it
107
+ was officially released to the public in 1995. Matsumoto''s goal was to create
108
+ a true object-oriented language that made programmers happy and emphasized
109
+ human needs over computer needs."}]},{"role":"user","parts":[{"text":"What
110
+ year was Ruby first released?"}]}],"generationConfig":{}}'
111
+ headers:
112
+ User-Agent:
113
+ - Faraday v2.14.4
114
+ Authorization:
115
+ - Bearer <AUTH_TOKEN>
116
+ Content-Type:
117
+ - application/json
118
+ Accept-Encoding:
119
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
120
+ Accept:
121
+ - "*/*"
122
+ response:
123
+ status:
124
+ code: 200
125
+ message: OK
126
+ headers:
127
+ Content-Type:
128
+ - application/json; charset=UTF-8
129
+ Access-Control-Allow-Credentials:
130
+ - 'true'
131
+ Access-Control-Allow-Headers:
132
+ - ''
133
+ Access-Control-Allow-Methods:
134
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
135
+ Access-Control-Allow-Origin:
136
+ - ''
137
+ Access-Control-Expose-Headers:
138
+ - Http_x_reqid
139
+ Http-X-Reqid:
140
+ - chatptvtx-484b82da2521468b89f4d7747b7789a3
141
+ X-Request-Id:
142
+ - chatptvtx-484b82da2521468b89f4d7747b7789a3
143
+ Server:
144
+ - APISIX
145
+ Cache-Control:
146
+ - no-cache
147
+ Content-Length:
148
+ - '1579'
149
+ Connection:
150
+ - keep-alive
151
+ Date:
152
+ - Mon, 28 Sep 2026 07:56:48 GMT
153
+ Eo-Log-Uuid:
154
+ - '16933637325182050549'
155
+ Eo-Cache-Status:
156
+ - MISS
157
+ body:
158
+ encoding: UTF-8
159
+ string: |
160
+ {
161
+ "candidates": [
162
+ {
163
+ "content": {
164
+ "role": "model",
165
+ "parts": [
166
+ {
167
+ "text": "Ruby was first released to the public in **1995** (specifically, version 0.95 was released on December 21, 1995).",
168
+ "thoughtSignature": "AY89a1+bM6bmR4WrlMUfphCC4DQ3Zg0GGjirBRSY2Uq0OUlHUIspp6N3zYsxmc0Hyqi/iPD28T7oU2dyuXAyGwKtB6CH8k19EixtntXKQ0gzsUmXdJCXCj77yCJgCB+dxd89fLQz1ojYRsrSXJPGfCq6GDa4SUpJPTLPtmeonkbn9vnOAXOnsop8PDVPW7RsJYbdgVDyoZp7ckx4OJqcDoaMcpEh1Hu9bquGDrG4WNn7LAP9iTrTGY6bBTk61uiO8IfcoVxV482Ayc/54L8CFe+iugNmbSIFonWteASGCobqL18/V4gV/nZOkO3/Zq+9SU9Fy2/VgRdimR2/uQIMZrTS7MyeM4UQlu4XDQTNiKdI583WRP599fd7nguLVvpI47JFfdWKiJtNNqM1N2T2t8FU2IDJlc7LCIuOeTRvoazxt1rKdb0TCYK8h+wmtOf9+KZajO+ciuEXG5kckeIW0X6ErBuvmDUfKewUooBITNYDnwoJYex7XSisHTlcbY3jbkxoz1xWAThQS4YDuzZthjYyBNWVI7xPRA+qDL01ThK9YU9fb35OxVs5M0p8VO4MdVlczfqNqMCRcxXsbvhyMt3nJr7DiROIfgL9JqoS6eiATMOeFmF8GlrImqvXJwejBpPEh8QSGrFtbrXi+taZrWv3XhWtW74OFlG8GtfsuBXqnJWsxrIMqnzw1SsdAZ+XCDRJ3ehcyp1Z"
169
+ }
170
+ ]
171
+ },
172
+ "finishReason": "STOP"
173
+ }
174
+ ],
175
+ "usageMetadata": {
176
+ "promptTokenCount": 93,
177
+ "candidatesTokenCount": 37,
178
+ "totalTokenCount": 261,
179
+ "trafficType": "ON_DEMAND",
180
+ "promptTokensDetails": [
181
+ {
182
+ "modality": "TEXT",
183
+ "tokenCount": 93
184
+ }
185
+ ],
186
+ "candidatesTokensDetails": [
187
+ {
188
+ "modality": "TEXT",
189
+ "tokenCount": 37
190
+ }
191
+ ],
192
+ "thoughtsTokenCount": 131
193
+ },
194
+ "modelVersion": "gemini-3.8-flash",
195
+ "createTime": "2026-09-28T07:56:49.430906Z",
196
+ "responseId": "wR26arqmGviO998Px6LnkAk"
197
+ }
198
+ recorded_at: Mon, 28 Sep 2026 07:56:51 GMT
199
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,97 @@
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''s 2 + 2?"}]}],"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
+ - application/json; charset=UTF-8
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
+ Http-X-Reqid:
38
+ - chatptvtx-f03da7173a9c4b49834e875de90f2713
39
+ X-Request-Id:
40
+ - chatptvtx-f03da7173a9c4b49834e875de90f2713
41
+ Server:
42
+ - APISIX
43
+ Cache-Control:
44
+ - no-cache
45
+ Content-Length:
46
+ - '1217'
47
+ Connection:
48
+ - keep-alive
49
+ Date:
50
+ - Mon, 28 Sep 2026 07:54:39 GMT
51
+ Eo-Log-Uuid:
52
+ - '8836279185428092038'
53
+ Eo-Cache-Status:
54
+ - MISS
55
+ body:
56
+ encoding: UTF-8
57
+ string: |
58
+ {
59
+ "candidates": [
60
+ {
61
+ "content": {
62
+ "role": "model",
63
+ "parts": [
64
+ {
65
+ "text": "2 + 2 = 4",
66
+ "thoughtSignature": "AY89a18T0u9wNvKX8s8pnUgBk3WDe3qnPOHa7KMvSz6AC8qIhh+6TN+P8zfOOxVIyExM+SE6a1HKPGkj5jQyE/d4hmI6wrp27vN8en4qQRMkZ6HdR5CUzIUlDaUrG/mGUkqDM9fPCOkIY6FCedEjqXShC/SV1YS+Xvrra/7oe0mgwMlNoBKg+R5xOB51GZvJTXAUqK6/rghN0ldBfNWncQX7bedL3WrqkkRtE8077U/Ny3ML0JY+G1Pn52rxNz1wIGEbYEWnaREOAkZzmSPIUkIMNznHgxsrLFU+tlb5KZBgqxfHiglJwAfuUOWsvgdNZHLuSnKqudz28a4UdVoYlhFhesW7aDbYFyWJaws7XSkgpE+sbeNd254l8JVirgFRIyy90yEE7DbxzVrZUam2VV7KJOUX9C2ENyXCILmloLZSsklez44SvJ994zR21wLxwpkNXcvJNJ9JHg=="
67
+ }
68
+ ]
69
+ },
70
+ "finishReason": "STOP"
71
+ }
72
+ ],
73
+ "usageMetadata": {
74
+ "promptTokenCount": 9,
75
+ "candidatesTokenCount": 7,
76
+ "totalTokenCount": 102,
77
+ "trafficType": "ON_DEMAND",
78
+ "promptTokensDetails": [
79
+ {
80
+ "modality": "TEXT",
81
+ "tokenCount": 9
82
+ }
83
+ ],
84
+ "candidatesTokensDetails": [
85
+ {
86
+ "modality": "TEXT",
87
+ "tokenCount": 7
88
+ }
89
+ ],
90
+ "thoughtsTokenCount": 86
91
+ },
92
+ "modelVersion": "gemini-3.8-flash",
93
+ "createTime": "2026-09-28T07:54:39.816335Z",
94
+ "responseId": "Px26as_pMaiY4_UP_56EGA"
95
+ }
96
+ recorded_at: Mon, 28 Sep 2026 07:54:42 GMT
97
+ recorded_with: VCR 6.4.0
@@ -0,0 +1,166 @@
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''s the weather in
9
+ Berlin? Use 52.5200, 13.4050."}]}],"generationConfig":{},"tools":[{"functionDeclarations":[{"name":"weather","description":"Gets
10
+ current weather for a location","parametersJsonSchema":{"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
+ - chatptvtx-23cabe4df72b4f73ab11f62b23c08052
41
+ X-Request-Id:
42
+ - chatptvtx-23cabe4df72b4f73ab11f62b23c08052
43
+ Server:
44
+ - APISIX
45
+ Cache-Control:
46
+ - no-cache
47
+ Content-Length:
48
+ - '1421'
49
+ Connection:
50
+ - keep-alive
51
+ Date:
52
+ - Mon, 28 Sep 2026 08:15:18 GMT
53
+ Eo-Log-Uuid:
54
+ - '2843634037480494276'
55
+ Eo-Cache-Status:
56
+ - MISS
57
+ body:
58
+ encoding: UTF-8
59
+ string: |
60
+ {
61
+ "candidates": [
62
+ {
63
+ "content": {
64
+ "role": "model",
65
+ "parts": [
66
+ {
67
+ "functionCall": {
68
+ "name": "weather",
69
+ "args": {
70
+ "latitude": "52.5200",
71
+ "longitude": "13.4050"
72
+ },
73
+ "id": "call_3172203"
74
+ },
75
+ "thoughtSignature": "AY89a1+IsIOBoWdUa2aKa4WW75aKddnczVsKbxmaKP6JrafXvB5L+QIGw0lmxdoyoXbrtF+6yGUg+H2htns61NP/++3ZsTL1RbeDlnSKR+jFrfPDJBgcAAacihDLM02eAUDLEvJjSqTX6jb3uB/TpQj0U9Urs2srANJzaz3q2GVG0mXQZwz5JycnYUjAvHO6qtqTaLxpPTwKg/CWLzKXzn+4mPsWxEIv6e3to73zA9OphJoS+Ca0EL+mpxLMGDgVdWnUlSHTaIzPNU1VL1IlE0SleH2YD7HU17ToV46lOkGEHEBWUtjyvZcrf1qLzv47wkX89LTlnPZNQTBbQAx9Z90kw5OHTFVlP951ktmDznG+kWio6Bdke+RWU0kTfnt+dWLKgv+N+QKTASFtuj4zM0K1dxM01FGmu0I6kelg4Fa1/PGO7JTAV28dB84W43386geyFoaNCol3RRA="
76
+ }
77
+ ]
78
+ },
79
+ "finishReason": "STOP"
80
+ }
81
+ ],
82
+ "usageMetadata": {
83
+ "promptTokenCount": 56,
84
+ "candidatesTokenCount": 32,
85
+ "totalTokenCount": 170,
86
+ "trafficType": "ON_DEMAND",
87
+ "promptTokensDetails": [
88
+ {
89
+ "modality": "TEXT",
90
+ "tokenCount": 56
91
+ }
92
+ ],
93
+ "candidatesTokensDetails": [
94
+ {
95
+ "modality": "TEXT",
96
+ "tokenCount": 32
97
+ }
98
+ ],
99
+ "thoughtsTokenCount": 82
100
+ },
101
+ "modelVersion": "gemini-3.8-flash",
102
+ "createTime": "2026-09-28T08:15:19.530416Z",
103
+ "responseId": "FyK6avCvIPGfpucPhpfeuQ0"
104
+ }
105
+ recorded_at: Mon, 28 Sep 2026 08:15:22 GMT
106
+ - request:
107
+ method: post
108
+ uri: "<QINIU_BASE_URL>/bypass/vertex/v1/models/google/gemini-3.8-flash:generateContent"
109
+ body:
110
+ encoding: UTF-8
111
+ string: '{"contents":[{"role":"user","parts":[{"text":"What''s the weather in
112
+ Berlin? Use 52.5200, 13.4050."}]},{"role":"model","parts":[{"functionCall":{"name":"weather","args":{"latitude":"52.5200","longitude":"13.4050"}},"thoughtSignature":"AY89a1+IsIOBoWdUa2aKa4WW75aKddnczVsKbxmaKP6JrafXvB5L+QIGw0lmxdoyoXbrtF+6yGUg+H2htns61NP/++3ZsTL1RbeDlnSKR+jFrfPDJBgcAAacihDLM02eAUDLEvJjSqTX6jb3uB/TpQj0U9Urs2srANJzaz3q2GVG0mXQZwz5JycnYUjAvHO6qtqTaLxpPTwKg/CWLzKXzn+4mPsWxEIv6e3to73zA9OphJoS+Ca0EL+mpxLMGDgVdWnUlSHTaIzPNU1VL1IlE0SleH2YD7HU17ToV46lOkGEHEBWUtjyvZcrf1qLzv47wkX89LTlnPZNQTBbQAx9Z90kw5OHTFVlP951ktmDznG+kWio6Bdke+RWU0kTfnt+dWLKgv+N+QKTASFtuj4zM0K1dxM01FGmu0I6kelg4Fa1/PGO7JTAV28dB84W43386geyFoaNCol3RRA="}]},{"role":"user","parts":[{"functionResponse":{"name":"weather","response":{"name":"weather","content":[{"text":"Current
113
+ weather at 52.5200, 13.4050: 15°C, Wind: 10 km/h"}]}}}]}],"generationConfig":{},"tools":[{"functionDeclarations":[{"name":"weather","description":"Gets
114
+ current weather for a location","parametersJsonSchema":{"type":"object","properties":{"latitude":{"type":"string","description":"Latitude"},"longitude":{"type":"string","description":"Longitude"}},"required":["latitude","longitude"],"additionalProperties":false,"strict":true}}]}]}'
115
+ headers:
116
+ User-Agent:
117
+ - Faraday v2.14.4
118
+ Authorization:
119
+ - Bearer <AUTH_TOKEN>
120
+ Content-Type:
121
+ - application/json
122
+ Accept-Encoding:
123
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
124
+ Accept:
125
+ - "*/*"
126
+ response:
127
+ status:
128
+ code: 200
129
+ message: OK
130
+ headers:
131
+ Content-Type:
132
+ - application/json; charset=UTF-8
133
+ Access-Control-Allow-Credentials:
134
+ - 'true'
135
+ Access-Control-Allow-Headers:
136
+ - ''
137
+ Access-Control-Allow-Methods:
138
+ - GET, POST, PUT, PATCH, DELETE, OPTIONS
139
+ Access-Control-Allow-Origin:
140
+ - ''
141
+ Access-Control-Expose-Headers:
142
+ - Http_x_reqid
143
+ Http-X-Reqid:
144
+ - chatptvtx-6e2e8bf250124594a88ad349a5eab450
145
+ X-Request-Id:
146
+ - chatptvtx-6e2e8bf250124594a88ad349a5eab450
147
+ Server:
148
+ - APISIX
149
+ Cache-Control:
150
+ - no-cache
151
+ Content-Length:
152
+ - '1134'
153
+ Connection:
154
+ - keep-alive
155
+ Date:
156
+ - Mon, 28 Sep 2026 08:15:22 GMT
157
+ Eo-Log-Uuid:
158
+ - '886845145779262849'
159
+ Eo-Cache-Status:
160
+ - MISS
161
+ body:
162
+ encoding: ASCII-8BIT
163
+ string: !binary |-
164
+ ewogICJjYW5kaWRhdGVzIjogWwogICAgewogICAgICAiY29udGVudCI6IHsKICAgICAgICAicm9sZSI6ICJtb2RlbCIsCiAgICAgICAgInBhcnRzIjogWwogICAgICAgICAgewogICAgICAgICAgICAidGV4dCI6ICJUaGUgY3VycmVudCB3ZWF0aGVyIGluIEJlcmxpbiAoNTIuNTIwMCwgMTMuNDA1MCkgaXMgMTXCsEMgd2l0aCBhIHdpbmQgc3BlZWQgb2YgMTAga20vaC4iLAogICAgICAgICAgICAidGhvdWdodFNpZ25hdHVyZSI6ICJBWTg5YTEvbFVhY2xnWWRzbld1SmNvQjJkWjdXSzZaV1pCMWcxbE90WEdUQW1HbXdyQkQvVXQrNVJUeUc2eU9aNUNEU0hwSHlWNXg3U0pvOWNvOTlaUVBUUGhJZUlzQmJCUnRyVHVxVHA3OXRNalZ2ZmNHY29BMFhjOS8yRnRESG84VGl2SzJLT0RKV2Zsb24yYXhBbWNFbDBzVkZCbnFCOVBoQWo5YXJOcEs1N1ZRM0RqaWFNUVZ3REErRnE3WTZFd2E0dUtDYktBOEwxdjNhRU8wODhFQ3hGZFBXYzdjbitnZzdKQ1lkZTBSQ1lxNmRJNjdwQXZ3ZlpOTHdGNmJaN2grL3ZXeVdBVHVkUkdIWjBUTmZCYjNCeS96akdHMXpqN2xpZFRVKyIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgICJmaW5pc2hSZWFzb24iOiAiU1RPUCIKICAgIH0KICBdLAogICJ1c2FnZU1ldGFkYXRhIjogewogICAgInByb21wdFRva2VuQ291bnQiOiAyMDMsCiAgICAiY2FuZGlkYXRlc1Rva2VuQ291bnQiOiA0MSwKICAgICJ0b3RhbFRva2VuQ291bnQiOiAyOTcsCiAgICAidHJhZmZpY1R5cGUiOiAiT05fREVNQU5EIiwKICAgICJwcm9tcHRUb2tlbnNEZXRhaWxzIjogWwogICAgICB7CiAgICAgICAgIm1vZGFsaXR5IjogIlRFWFQiLAogICAgICAgICJ0b2tlbkNvdW50IjogMjAzCiAgICAgIH0KICAgIF0sCiAgICAiY2FuZGlkYXRlc1Rva2Vuc0RldGFpbHMiOiBbCiAgICAgIHsKICAgICAgICAibW9kYWxpdHkiOiAiVEVYVCIsCiAgICAgICAgInRva2VuQ291bnQiOiA0MQogICAgICB9CiAgICBdLAogICAgInRob3VnaHRzVG9rZW5Db3VudCI6IDUzCiAgfSwKICAibW9kZWxWZXJzaW9uIjogImdlbWluaS0zLjgtZmxhc2giLAogICJjcmVhdGVUaW1lIjogIjIwMjYtMDktMjhUMDg6MTU6MjMuMTU5MzM3WiIsCiAgInJlc3BvbnNlSWQiOiAiR3lLNmF1bmNDYUdCcHVjUDBwcURpQXMiCn0K
165
+ recorded_at: Mon, 28 Sep 2026 08:15:25 GMT
166
+ recorded_with: VCR 6.4.0