liter_llm 1.9.0.pre.rc.2-aarch64-linux → 1.10.1-aarch64-linux

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: 117caf0580ad45da223748df015c36c4759af17549cac8d4ab119abc9b116691
4
- data.tar.gz: 70452b24199da4c4e2ae174d8aae8c95289f6778dbb8ea0b625b9e8cdbf65a2e
3
+ metadata.gz: c320633716d83c24cb0aec9598f29f32ed440faf72fed13e274dac0bf12e8018
4
+ data.tar.gz: ca42c8b4ad009de05276e06c8240a2795ba466a119d6728a546d96a00385850f
5
5
  SHA512:
6
- metadata.gz: 79f924237ce8d7eca0cb75137d5b5e44bad083aa9ada47e51b64cde370678210933af52730689243daadca225808ef389678530c8383af553e920e280a01ee44
7
- data.tar.gz: 42a6b7cd6645075dd5088ad0259df3b801e5522e3a1a4bcafe6f793033746567eaf548a22a21d96f7da253d5838bcf3fe21ad0e3ae593f1d0237408e87323d62
6
+ metadata.gz: 4c138ff659c2f6114f3fbea9974c64afc072f8cda812bb5952cebb383e4a53b6b7e94d0aeb75359ff26b3c4a3ffa410d9d1aac29fe9d5922f93735af3284ba88
7
+ data.tar.gz: ea8f5ee048f301c3a3b7763ea770ad8d3d873a780a532ad7cdb34f5392389cfcd6a542c940fb18df770ebcf599e3706ecc8a9542132f7ae95fc1a2982e14e077
data/README.md CHANGED
@@ -8,78 +8,78 @@
8
8
  # Ruby
9
9
 
10
10
  <div align="center" style="display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0">
11
- <!-- Built with -->
12
- <a href="https://github.com/xberg-io/alef">
13
- <img src="https://img.shields.io/badge/Bindings-alef%20%D7%90-007ec6" alt="Bindings" />
14
- </a>
15
- <!-- Language Bindings -->
16
- <a href="https://crates.io/crates/liter-llm">
17
- <img src="https://img.shields.io/crates/v/liter-llm?label=Rust&color=007ec6" alt="Rust" />
18
- </a>
19
- <a href="https://pypi.org/project/liter-llm/">
20
- <img src="https://img.shields.io/pypi/v/liter-llm?label=Python&color=007ec6" alt="Python" />
21
- </a>
22
- <a href="https://www.npmjs.com/package/@xberg-io/liter-llm">
23
- <img src="https://img.shields.io/npm/v/@xberg-io/liter-llm?label=Node.js&color=007ec6" alt="Node.js" />
24
- </a>
25
- <a href="https://www.npmjs.com/package/@xberg-io/liter-llm-wasm">
26
- <img src="https://img.shields.io/npm/v/@xberg-io/liter-llm-wasm?label=WASM&color=007ec6" alt="WASM" />
27
- </a>
28
- <a href="https://central.sonatype.com/artifact/io.xberg.literllm/liter-llm">
29
- <img src="https://img.shields.io/maven-central/v/io.xberg.literllm/liter-llm?label=Java&color=007ec6" alt="Java" />
30
- </a>
31
- <a href="https://github.com/xberg-io/liter-llm/tree/main/packages/go">
32
- <img src="https://img.shields.io/github/v/tag/xberg-io/liter-llm?label=Go&color=007ec6" alt="Go" />
33
- </a>
34
- <a href="https://www.nuget.org/packages/LiterLlm">
35
- <img src="https://img.shields.io/nuget/v/LiterLlm?label=C%23&color=007ec6" alt="C#" />
36
- </a>
37
- <a href="https://packagist.org/packages/xberg-io/liter-llm">
38
- <img src="https://img.shields.io/packagist/v/xberg-io/liter-llm?label=PHP&color=007ec6" alt="PHP" />
39
- </a>
40
- <a href="https://rubygems.org/gems/liter_llm">
41
- <img src="https://img.shields.io/gem/v/liter_llm?label=Ruby&color=007ec6" alt="Ruby" />
42
- </a>
43
- <a href="https://hex.pm/packages/liter_llm">
44
- <img src="https://img.shields.io/hexpm/v/liter_llm?label=Elixir&color=007ec6" alt="Elixir" />
45
- </a>
46
- <a href="https://github.com/xberg-io/liter-llm/pkgs/container/liter-llm">
47
- <img src="https://img.shields.io/badge/Docker-007ec6?logo=docker&logoColor=white" alt="Docker" />
48
- </a>
49
- <a href="https://github.com/xberg-io/homebrew-tap/blob/main/Formula/liter-llm.rb">
50
- <img src="https://img.shields.io/badge/Homebrew-007ec6?logo=homebrew&logoColor=white" alt="Homebrew" />
51
- </a>
52
- <a href="https://github.com/xberg-io/liter-llm/tree/main/crates/liter-llm-ffi">
53
- <img src="https://img.shields.io/badge/C-FFI-007ec6" alt="C FFI" />
54
- </a>
55
-
56
- <!-- Project Info -->
57
- <a href="https://github.com/xberg-io/liter-llm/blob/main/LICENSE">
58
- <img src="https://img.shields.io/badge/License-MIT-007ec6" alt="License" />
59
- </a>
60
- <a href="https://docs.liter-llm.xberg.io">
61
- <img src="https://img.shields.io/badge/Docs-liter--llm-007ec6" alt="Docs" />
62
- </a>
11
+ <!-- Built with -->
12
+ <a href="https://github.com/xberg-io/alef">
13
+ <img src="https://img.shields.io/badge/built%20with-alef%20%D7%90-007ec6" alt="Built with alef" />
14
+ </a>
15
+ <!-- Language Bindings -->
16
+ <a href="https://crates.io/crates/liter-llm">
17
+ <img src="https://img.shields.io/crates/v/liter-llm?label=Rust&color=007ec6" alt="Rust" />
18
+ </a>
19
+ <a href="https://pypi.org/project/liter-llm/">
20
+ <img src="https://img.shields.io/pypi/v/liter-llm?label=Python&color=007ec6" alt="Python" />
21
+ </a>
22
+ <a href="https://www.npmjs.com/package/@xberg-io/liter-llm">
23
+ <img src="https://img.shields.io/npm/v/@xberg-io/liter-llm?label=Node.js&color=007ec6" alt="Node.js" />
24
+ </a>
25
+ <a href="https://www.npmjs.com/package/@xberg-io/liter-llm-wasm">
26
+ <img src="https://img.shields.io/npm/v/@xberg-io/liter-llm-wasm?label=WASM&color=007ec6" alt="WASM" />
27
+ </a>
28
+ <a href="https://central.sonatype.com/artifact/io.xberg.literllm/liter-llm">
29
+ <img src="https://img.shields.io/maven-central/v/io.xberg.literllm/liter-llm?label=Java&color=007ec6" alt="Java" />
30
+ </a>
31
+ <a href="https://github.com/xberg-io/liter-llm/tree/main/packages/go">
32
+ <img src="https://img.shields.io/github/v/tag/xberg-io/liter-llm?label=Go&color=007ec6" alt="Go" />
33
+ </a>
34
+ <a href="https://www.nuget.org/packages/LiterLlm">
35
+ <img src="https://img.shields.io/nuget/v/LiterLlm?label=C%23&color=007ec6" alt="C#" />
36
+ </a>
37
+ <a href="https://packagist.org/packages/xberg-io/liter-llm">
38
+ <img src="https://img.shields.io/packagist/v/xberg-io/liter-llm?label=PHP&color=007ec6" alt="PHP" />
39
+ </a>
40
+ <a href="https://rubygems.org/gems/liter_llm">
41
+ <img src="https://img.shields.io/gem/v/liter_llm?label=Ruby&color=007ec6" alt="Ruby" />
42
+ </a>
43
+ <a href="https://hex.pm/packages/liter_llm">
44
+ <img src="https://img.shields.io/hexpm/v/liter_llm?label=Elixir&color=007ec6" alt="Elixir" />
45
+ </a>
46
+ <a href="https://github.com/xberg-io/liter-llm/pkgs/container/liter-llm">
47
+ <img src="https://img.shields.io/badge/Docker-007ec6?logo=docker&logoColor=white" alt="Docker" />
48
+ </a>
49
+ <a href="https://github.com/xberg-io/homebrew-tap/blob/main/Formula/liter-llm.rb">
50
+ <img src="https://img.shields.io/badge/Homebrew-007ec6?logo=homebrew&logoColor=white" alt="Homebrew" />
51
+ </a>
52
+ <a href="https://github.com/xberg-io/liter-llm/tree/main/crates/liter-llm-ffi">
53
+ <img src="https://img.shields.io/badge/C-FFI-007ec6" alt="C FFI" />
54
+ </a>
55
+
56
+ <!-- Project Info -->
57
+ <a href="https://github.com/xberg-io/liter-llm/blob/main/LICENSE">
58
+ <img src="https://img.shields.io/badge/License-MIT-007ec6" alt="License" />
59
+ </a>
60
+ <a href="https://docs.liter-llm.xberg.io">
61
+ <img src="https://img.shields.io/badge/Docs-liter--llm-007ec6" alt="Docs" />
62
+ </a>
63
63
  </div>
64
64
  <div align="center" style="margin: 24px 0 0">
65
- <a href="https://xberg.io">
66
- <img
67
- alt="xberg.io"
68
- src="https://github.com/user-attachments/assets/1b6c6ad7-3b6d-4171-b1c9-f2026cc9deb8"
69
- />
70
- </a>
65
+ <a href="https://xberg.io">
66
+ <img
67
+ alt="xberg.io"
68
+ src="https://github.com/user-attachments/assets/1b6c6ad7-3b6d-4171-b1c9-f2026cc9deb8"
69
+ />
70
+ </a>
71
71
  </div>
72
72
  <div align="center" style="display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0 24px">
73
- <a href="https://discord.gg/xt9WY3GnKR">
74
- <img
75
- height="22"
76
- src="https://img.shields.io/badge/Discord-Chat-007ec6?logo=discord&logoColor=white"
77
- alt="Join Discord"
78
- />
79
- </a>
73
+ <a href="https://discord.gg/xt9WY3GnKR">
74
+ <img
75
+ height="22"
76
+ src="https://img.shields.io/badge/Discord-Chat-007ec6?logo=discord&logoColor=white"
77
+ alt="Join Discord"
78
+ />
79
+ </a>
80
80
  </div>
81
81
 
82
- Universal LLM API client for Ruby. Access 143 LLM providers through a single interface with idiomatic Ruby API and native performance.
82
+ Universal LLM API client for Ruby. Access 163 LLM providers through a single interface with idiomatic Ruby API and native performance.
83
83
 
84
84
  ## What This Package Provides
85
85
 
@@ -168,7 +168,7 @@ puts
168
168
 
169
169
  ## Features
170
170
 
171
- ### Supported Providers (143)
171
+ ### Supported Providers (163)
172
172
 
173
173
  Route to any provider using the `provider/model` prefix convention:
174
174
 
@@ -188,7 +188,7 @@ Route to any provider using the `provider/model` prefix convention:
188
188
 
189
189
  ### Key Capabilities
190
190
 
191
- - **Provider Routing** -- Single client for 143 LLM providers via `provider/model` prefix
191
+ - **Provider Routing** -- Single client for 163 LLM providers via `provider/model` prefix
192
192
  - **Local LLMs** — Connect to locally-hosted models via Ollama, LM Studio, vLLM, llama.cpp, and other local inference servers
193
193
  - **Unified API** -- Consistent `chat`, `chat_stream`, `embeddings`, `list_models` interface
194
194
  - **Streaming** -- Real-time token streaming via `chat_stream`
@@ -209,7 +209,7 @@ Built on a compiled Rust core for speed and safety:
209
209
 
210
210
  ## Provider Routing
211
211
 
212
- Route to 143 providers using the `provider/model` prefix convention:
212
+ Route to 163 providers using the `provider/model` prefix convention:
213
213
 
214
214
  ```text
215
215
  openai/gpt-4o
@@ -244,7 +244,7 @@ To use the MCP server inside a coding agent, install the **liter-llm plugin** fr
244
244
 
245
245
  - **[Documentation](https://docs.liter-llm.xberg.io)** -- Full docs and API reference
246
246
  - **[GitHub Repository](https://github.com/xberg-io/liter-llm)** -- Source, issues, and discussions
247
- - **[Provider Registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)** -- 143 supported providers
247
+ - **[Provider Registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)** -- 163 supported providers
248
248
 
249
249
  ## Part of Xberg.io
250
250
 
@@ -252,7 +252,7 @@ To use the MCP server inside a coding agent, install the **liter-llm plugin** fr
252
252
  - [Xberg Enterprise](https://github.com/xberg-io/xberg-enterprise) — managed extraction API with SDKs, dashboards, and observability.
253
253
  - [crawlberg](https://github.com/xberg-io/crawlberg) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
254
254
  - [html-to-markdown](https://github.com/xberg-io/html-to-markdown) — fast, lossless HTML→Markdown engine.
255
- - [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and 143 providers.
255
+ - [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and 163 providers.
256
256
  - [tree-sitter-language-pack](https://github.com/xberg-io/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
257
257
  - [alef](https://github.com/xberg-io/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
258
258
  - [Discord](https://discord.gg/xt9WY3GnKR) — community, roadmap, announcements.
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:1c1a4f40437bd3664405b1b60a53b4dc867f8b6f298baac7d0bf32a63ff9e517
2
+ # alef:hash:f2d02d39ed23b63568387f22c991c70fd7b0d5c8f2f92cc028dcbaff825ca583
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
  # frozen_string_literal: true
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:1c1a4f40437bd3664405b1b60a53b4dc867f8b6f298baac7d0bf32a63ff9e517
2
+ # alef:hash:f2d02d39ed23b63568387f22c991c70fd7b0d5c8f2f92cc028dcbaff825ca583
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module LiterLlm
8
8
  ## The version string for this package.
9
- VERSION = "1.9.0.pre.rc.2"
9
+ VERSION = "1.10.1"
10
10
  end
data/lib/liter_llm.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:1c1a4f40437bd3664405b1b60a53b4dc867f8b6f298baac7d0bf32a63ff9e517
2
+ # alef:hash:f2d02d39ed23b63568387f22c991c70fd7b0d5c8f2f92cc028dcbaff825ca583
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
  # frozen_string_literal: true
@@ -16,3 +16,12 @@ require_relative "liter_llm/native"
16
16
  module LiterLlm
17
17
  # Re-export all types and functions from native extension
18
18
  end
19
+
20
+ # Bring top-level LiterLlm classes into the global namespace so callers
21
+ # (and the generated e2e suite) can reference them unqualified. The native
22
+ # extension has already been required above, so every type constant is defined
23
+ # under LiterLlm by this point.
24
+ LiterLlm.constants.each do |const_name|
25
+ value = LiterLlm.const_get(const_name)
26
+ ::Object.const_set(const_name, value) if value.is_a?(Module) && !::Object.const_defined?(const_name)
27
+ end
data/lib/liter_llm_rb.so CHANGED
Binary file
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:1c1a4f40437bd3664405b1b60a53b4dc867f8b6f298baac7d0bf32a63ff9e517
2
+ # alef:hash:f2d02d39ed23b63568387f22c991c70fd7b0d5c8f2f92cc028dcbaff825ca583
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
 
@@ -741,6 +741,43 @@ module LiterLlm
741
741
  def initialize: (auth_type: AuthType, ?env_var: String) -> void
742
742
  end
743
743
 
744
+ class ModelInfo
745
+ attr_accessor input_cost_per_token: Float?
746
+ attr_accessor output_cost_per_token: Float?
747
+ attr_accessor cache_read_input_token_cost: Float?
748
+ attr_accessor cache_creation_input_token_cost: Float?
749
+ attr_accessor input_cost_per_audio_token: Float?
750
+ attr_accessor output_cost_per_audio_token: Float?
751
+ attr_accessor output_cost_per_reasoning_token: Float?
752
+ attr_accessor max_tokens: Integer?
753
+ attr_accessor max_input_tokens: Integer?
754
+ attr_accessor max_output_tokens: Integer?
755
+ attr_accessor mode: String?
756
+ attr_accessor supports_vision: bool?
757
+ attr_accessor supports_function_calling: bool?
758
+ attr_accessor supports_reasoning: bool?
759
+ attr_accessor supports_structured_output: bool?
760
+ attr_accessor supports_audio_input: bool?
761
+ attr_accessor supports_audio_output: bool?
762
+ attr_accessor supports_prompt_caching: bool?
763
+ attr_accessor tiers: Array[ModelTier]?
764
+
765
+ def initialize: (?input_cost_per_token: Float, ?output_cost_per_token: Float, ?cache_read_input_token_cost: Float, ?cache_creation_input_token_cost: Float, ?input_cost_per_audio_token: Float, ?output_cost_per_audio_token: Float, ?output_cost_per_reasoning_token: Float, ?max_tokens: Integer, ?max_input_tokens: Integer, ?max_output_tokens: Integer, ?mode: String, ?supports_vision: bool, ?supports_function_calling: bool, ?supports_reasoning: bool, ?supports_structured_output: bool, ?supports_audio_input: bool, ?supports_audio_output: bool, ?supports_prompt_caching: bool, ?tiers: Array[ModelTier]) -> void
766
+ end
767
+
768
+ class ModelTier
769
+ attr_accessor min_context_tokens: Integer?
770
+ attr_accessor input_cost_per_token: Float?
771
+ attr_accessor output_cost_per_token: Float?
772
+ attr_accessor cache_read_input_token_cost: Float?
773
+ attr_accessor cache_creation_input_token_cost: Float?
774
+ attr_accessor input_cost_per_audio_token: Float?
775
+ attr_accessor output_cost_per_audio_token: Float?
776
+ attr_accessor output_cost_per_reasoning_token: Float?
777
+
778
+ def initialize: (?min_context_tokens: Integer, ?input_cost_per_token: Float, ?output_cost_per_token: Float, ?cache_read_input_token_cost: Float, ?cache_creation_input_token_cost: Float, ?input_cost_per_audio_token: Float, ?output_cost_per_audio_token: Float, ?output_cost_per_reasoning_token: Float) -> void
779
+ end
780
+
744
781
  class BudgetConfig
745
782
  attr_accessor global_limit: Float?
746
783
  attr_accessor model_limits: Hash[String, Float]?
@@ -779,6 +816,16 @@ module LiterLlm
779
816
  def initialize: (name: String, embedding: Array[Float], model: String) -> void
780
817
  end
781
818
 
819
+ class CatalogRefreshConfig
820
+ attr_accessor enabled: bool?
821
+ attr_accessor source_url: String?
822
+ attr_accessor ttl_seconds: Integer?
823
+ attr_accessor cache_path: String?
824
+
825
+ def initialize: (?enabled: bool, ?source_url: String, ?ttl_seconds: Integer, ?cache_path: String) -> void
826
+ def self.default: () -> CatalogRefreshConfig
827
+ end
828
+
782
829
  class Message
783
830
  end
784
831
 
@@ -879,6 +926,10 @@ module LiterLlm
879
926
  type value = :healthy | :unhealthy
880
927
  end
881
928
 
929
+ class RefreshOutcome
930
+ type value = :disabled | :from_cache | :fetched
931
+ end
932
+
882
933
  def self.create_client: (String api_key, ?String base_url, ?Integer timeout_secs, ?Integer max_retries, ?String model_hint) -> DefaultClient
883
934
 
884
935
  def self.create_client_from_json: (String json) -> DefaultClient
@@ -901,6 +952,8 @@ module LiterLlm
901
952
 
902
953
  def self.completion_cost_with_cache: (String model, Integer prompt_tokens, Integer cached_tokens, Integer completion_tokens) -> Float?
903
954
 
955
+ def self.model_info: (String model) -> ModelInfo?
956
+
904
957
  def self.clear: () -> void
905
958
 
906
959
  def self.count_tokens: (String model, String text) -> Integer
@@ -911,6 +964,12 @@ module LiterLlm
911
964
 
912
965
  def self.ensure_crypto_provider: () -> void
913
966
 
967
+ def self.install_catalog_overlay_from_str: (String catalog_json) -> void
968
+
969
+ def self.clear_catalog_overlay: () -> void
970
+
971
+ def self.refresh_catalog: (CatalogRefreshConfig config) -> RefreshOutcome
972
+
914
973
  class LiterLlmErrorInfo
915
974
  def status_code: () -> Integer
916
975
  def transient?: () -> bool
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liter_llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0.pre.rc.2
4
+ version: 1.10.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Na'aman Hirschfeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-27 00:00:00.000000000 Z
11
+ date: 2026-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime
@@ -53,9 +53,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: 3.2.0
56
- - - "<"
57
- - !ruby/object:Gem::Version
58
- version: '4.0'
59
56
  required_rubygems_version: !ruby/object:Gem::Requirement
60
57
  requirements:
61
58
  - - ">="