ask-llm-providers 0.5.0 → 0.6.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83d9430295753c63779ef81db7fbbc4e9c56c3e1848f44e53a763c70c43cc1f8
4
- data.tar.gz: a9ea83f80669da1e5869204a42af7bc52e071d81f355da80df26002246d3b828
3
+ metadata.gz: 82485a61da8048017c554844b7b31218778eca6c20a95a237331b62c2eb31da4
4
+ data.tar.gz: 66818f024528ecf1dde358b5a6e0882687b2e75c023d9c02659fa9c97116babb
5
5
  SHA512:
6
- metadata.gz: 870a8543f6810948e62f65b18b39f0924a78ec393108f74e992ecff25cfe8e14ae8331d287d436afdb88f3792379c778598b3188642c4c5a002bb374f56a0c8e
7
- data.tar.gz: 211593c5668424aab22e2f03c6230d6ad791a4f7f6002b60b8e26e879f2ae8d6e28782b29790611c796c8fa2d0edab1494e1a9d61ec638a4b78fde1fbba639a2
6
+ metadata.gz: ac4f1392b495866a46232a8d3b7b5ae00adf4db9e14cc05c774e3478a15f31f8d79313eebf110749d3972ea6f5b02ec33d90a536ec4dade0a8498c58b265ca45
7
+ data.tar.gz: 423dadd52ef3653cf8552b7fde1f9a551c793f0c9c1650af139ada68f415d22e90f9d76a1e6788fd2633f074af09439dbf8304168e3f017f7161a46627330327
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.6.0] — 2026-07-17
2
+
3
+ ### Added
4
+
5
+ - **14 new OpenAI-compatible providers** — aiml, ai21, anyscale, deepinfra, featherless, friendli, github, hyperbolic, meta, nebius, novita, nscale, nvidia_nim, sambanova. Each is one line in the registry. Total OpenAI-compatible providers: 26. Total providers: 33.
6
+ - **Auto-generated tests** — `OpenAICompatibleTest` now builds its test list from `OPENAI_COMPATIBLE` dynamically. Adding a provider automatically generates 5 identity tests (registered, slug, capabilities, api_base, requires_api_key).
7
+
1
8
  ## [0.5.0] — 2026-07-17
2
9
 
3
10
  ### Added
@@ -7,51 +7,95 @@ module Ask
7
7
  # Each entry is configuration for {Ask::Providers::OpenAICompatible}.
8
8
  # To add a new provider, add one line here — no new file, no subclass.
9
9
  #
10
- # @example Adding Groq
10
+ # @example
11
11
  # groq: { api_base: "https://api.groq.com/openai/v1", api_key_env: "GROQ_API_KEY" }
12
12
  #
13
13
  OPENAI_COMPATIBLE = {
14
- deepseek: { api_base: "https://api.deepseek.com", api_key_env: "DEEPSEEK_API_KEY",
15
- reasoning_content: true,
16
- capabilities: { chat: true, streaming: true, tool_calls: true, thinking: true } },
14
+ aiml: { api_base: "https://api.aimlapi.com/v1", api_key_env: "AIML_API_KEY",
15
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
17
16
 
18
- openrouter: { api_base: "https://openrouter.ai/api/v1", api_key_env: "OPENROUTER_API_KEY",
19
- extra_headers: { "HTTP-Referer" => "https://github.com/ask-rb",
20
- "X-Title" => "ask-rb" },
21
- capabilities: { chat: true, streaming: true, tool_calls: true, vision: true,
22
- thinking: true, structured_output: true } },
17
+ ai21: { api_base: "https://api.ai21.com/studio/v1", api_key_env: "AI21_API_KEY",
18
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
23
19
 
24
- opencode: { api_base: "https://opencode.ai/zen/v1", api_key_env: "OPENCODE_API_KEY",
25
- capabilities: { chat: true, streaming: true, tool_calls: true } },
20
+ anyscale: { api_base: "https://api.endpoints.anyscale.com/v1", api_key_env: "ANYSCALE_API_KEY",
21
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
26
22
 
27
- opencode_go: { api_base: "https://opencode.ai/zen/go/v1", api_key_env: "OPENCODE_GO_API_KEY",
28
- alternate_env: "OPENCODE_API_KEY",
29
- capabilities: { chat: true, streaming: true, tool_calls: true } },
23
+ cerebras: { api_base: "https://api.cerebras.ai/v1", api_key_env: "CEREBRAS_API_KEY",
24
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
30
25
 
31
- mimo: { api_base: "https://token-plan-sgp.xiaomimimo.com/v1", api_key_env: "MIMO_API_KEY",
32
- capabilities: { chat: true, streaming: true } },
26
+ deepinfra: { api_base: "https://api.deepinfra.com/v1/openai", api_key_env: "DEEPINFRA_API_KEY",
27
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
33
28
 
34
- groq: { api_base: "https://api.groq.com/openai/v1", api_key_env: "GROQ_API_KEY",
35
- capabilities: { chat: true, streaming: true, tool_calls: true, vision: true } },
29
+ deepseek: { api_base: "https://api.deepseek.com", api_key_env: "DEEPSEEK_API_KEY",
30
+ reasoning_content: true,
31
+ capabilities: { chat: true, streaming: true, tool_calls: true, thinking: true } },
36
32
 
37
- together: { api_base: "https://api.together.xyz/v1", api_key_env: "TOGETHER_API_KEY",
38
- capabilities: { chat: true, streaming: true, tool_calls: true } },
33
+ featherless: { api_base: "https://api.featherless.ai/v1", api_key_env: "FEATHERLESS_API_KEY",
34
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
39
35
 
40
- fireworks: { api_base: "https://api.fireworks.ai/inference/v1", api_key_env: "FIREWORKS_API_KEY",
41
- capabilities: { chat: true, streaming: true, tool_calls: true } },
36
+ fireworks: { api_base: "https://api.fireworks.ai/inference/v1", api_key_env: "FIREWORKS_API_KEY",
37
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
42
38
 
43
- perplexity: { api_base: "https://api.perplexity.ai", api_key_env: "PERPLEXITY_API_KEY",
44
- capabilities: { chat: true, streaming: true } },
39
+ friendli: { api_base: "https://api.friendli.ai/serverless/v1", api_key_env: "FRIENDLI_API_KEY",
40
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
45
41
 
46
- cerebras: { api_base: "https://api.cerebras.ai/v1", api_key_env: "CEREBRAS_API_KEY",
47
- capabilities: { chat: true, streaming: true, tool_calls: true } },
42
+ github: { api_base: "https://models.inference.ai.azure.com", api_key_env: "GITHUB_API_KEY",
43
+ capabilities: { chat: true, streaming: true, tool_calls: true, vision: true } },
48
44
 
49
- xai: { api_base: "https://api.x.ai/v1", api_key_env: "XAI_API_KEY",
50
- capabilities: { chat: true, streaming: true, tool_calls: true, vision: true,
51
- thinking: true } },
45
+ groq: { api_base: "https://api.groq.com/openai/v1", api_key_env: "GROQ_API_KEY",
46
+ capabilities: { chat: true, streaming: true, tool_calls: true, vision: true } },
52
47
 
53
- moonshot: { api_base: "https://api.moonshot.ai/v1", api_key_env: "MOONSHOT_API_KEY",
54
- capabilities: { chat: true, streaming: true } }
48
+ hyperbolic: { api_base: "https://api.hyperbolic.xyz/v1", api_key_env: "HYPERBOLIC_API_KEY",
49
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
50
+
51
+ meta: { api_base: "https://api.llama.com/compat/v1", api_key_env: "LLAMA_API_KEY",
52
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
53
+
54
+ mimo: { api_base: "https://token-plan-sgp.xiaomimimo.com/v1", api_key_env: "MIMO_API_KEY",
55
+ capabilities: { chat: true, streaming: true } },
56
+
57
+ moonshot: { api_base: "https://api.moonshot.ai/v1", api_key_env: "MOONSHOT_API_KEY",
58
+ capabilities: { chat: true, streaming: true } },
59
+
60
+ nebius: { api_base: "https://api.studio.nebius.ai/v1", api_key_env: "NEBIUS_API_KEY",
61
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
62
+
63
+ novita: { api_base: "https://api.novita.ai/v3/openai", api_key_env: "NOVITA_API_KEY",
64
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
65
+
66
+ nscale: { api_base: "https://inference.api.nscale.com/v1", api_key_env: "NSCALE_API_KEY",
67
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
68
+
69
+ nvidia_nim: { api_base: "https://integrate.api.nvidia.com/v1", api_key_env: "NVIDIA_NIM_API_KEY",
70
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
71
+
72
+ opencode: { api_base: "https://opencode.ai/zen/v1", api_key_env: "OPENCODE_API_KEY",
73
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
74
+
75
+ opencode_go: { api_base: "https://opencode.ai/zen/go/v1", api_key_env: "OPENCODE_GO_API_KEY",
76
+ alternate_env: "OPENCODE_API_KEY",
77
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
78
+
79
+ openrouter: { api_base: "https://openrouter.ai/api/v1", api_key_env: "OPENROUTER_API_KEY",
80
+ extra_headers: { "HTTP-Referer" => "https://github.com/ask-rb",
81
+ "X-Title" => "ask-rb" },
82
+ capabilities: { chat: true, streaming: true, tool_calls: true, vision: true,
83
+ thinking: true, structured_output: true } },
84
+
85
+ perplexity: { api_base: "https://api.perplexity.ai", api_key_env: "PERPLEXITY_API_KEY",
86
+ capabilities: { chat: true, streaming: true } },
87
+
88
+ sambanova: { api_base: "https://api.sambanova.ai/v1", api_key_env: "SAMBANOVA_API_KEY",
89
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
90
+
91
+ together: { api_base: "https://api.together.xyz/v1", api_key_env: "TOGETHER_API_KEY",
92
+ capabilities: { chat: true, streaming: true, tool_calls: true } },
93
+
94
+ xai: { api_base: "https://api.x.ai/v1", api_key_env: "XAI_API_KEY",
95
+ capabilities: { chat: true, streaming: true, tool_calls: true, vision: true,
96
+ thinking: true } }
55
97
  }.freeze
98
+
99
+ OPENAI_COMPATIBLE_COUNT = OPENAI_COMPATIBLE.size
56
100
  end
57
101
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module LLM
5
- VERSION = "0.5.0"
5
+ VERSION = "0.6.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-llm-providers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto