liter_llm 1.8.1 → 1.9.0.pre.rc.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08551904e8632618458a12e62668686bdcdf4b00fe33d2a86b87674df9b53025'
4
- data.tar.gz: 9ae5aeb9b9b8c87924e2e9cfdb03de578427948917b660c72e1d5a83d8df1fb4
3
+ metadata.gz: 460782a2511903df7eafce6c749453ab80fe88f5a98feae02f1e62f5d8ae8ea8
4
+ data.tar.gz: fb46a08c7949d66554518028bfb6abeaf27339fab5499ef760f0a513b2b2855a
5
5
  SHA512:
6
- metadata.gz: a737a85d89d3a3499cea4b5efdb41d6511dc5a7797f721c8521aa5d97e86a8a1dc6c26020462bd7320c1c1d8049b0413a7eb5e3fdae73069fb45f3e6283ddd57
7
- data.tar.gz: 4947dc0e58bc968edd133fb18ea3268c80a2ada9428c2c963e3c5588ff9fa17baba52629b3aab56f6868b29b0c7dae1237b2cc0d7a17d9bca53f49bc1beacd1d
6
+ metadata.gz: f6f6b92b54c19b49e273b11a97f3648ad37443c9d98f562e5f7ce51621d8073cb79b54aa8d9f9363b27354a4084f4a655d532034c245bdf114231fcd2708a9aa
7
+ data.tar.gz: cb9bfc1aa00c362ecc6d3b6f9b40c72cf358d221f2ce59f8e2d40db93e16ef4f1f24f111899a1e29f0834513d725ab5b255b42f437e474d2e1277f2cbe7e1a1f
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2026 Na'aman Hirschfeld
1
+ Copyright 2026 Kreuzberg, Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
data/README.md CHANGED
@@ -1,8 +1,15 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/xberg-io/assets@v1/banner/readme-banner-dark.svg">
4
+ <img alt="Xberg" width="420" src="https://cdn.jsdelivr.net/gh/xberg-io/assets@v1/banner/readme-banner-light.svg">
5
+ </picture>
6
+ </p>
7
+
1
8
  # Ruby
2
9
 
3
10
  <div align="center" style="display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0">
4
11
  <!-- Built with -->
5
- <a href="https://github.com/kreuzberg-dev/alef">
12
+ <a href="https://github.com/xberg-io/alef">
6
13
  <img src="https://img.shields.io/badge/Bindings-alef%20%D7%90-007ec6" alt="Bindings" />
7
14
  </a>
8
15
  <!-- Language Bindings -->
@@ -12,23 +19,23 @@
12
19
  <a href="https://pypi.org/project/liter-llm/">
13
20
  <img src="https://img.shields.io/pypi/v/liter-llm?label=Python&color=007ec6" alt="Python" />
14
21
  </a>
15
- <a href="https://www.npmjs.com/package/@kreuzberg/liter-llm">
16
- <img src="https://img.shields.io/npm/v/@kreuzberg/liter-llm?label=Node.js&color=007ec6" alt="Node.js" />
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" />
17
24
  </a>
18
- <a href="https://www.npmjs.com/package/@kreuzberg/liter-llm-wasm">
19
- <img src="https://img.shields.io/npm/v/@kreuzberg/liter-llm-wasm?label=WASM&color=007ec6" alt="WASM" />
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" />
20
27
  </a>
21
- <a href="https://central.sonatype.com/artifact/dev.kreuzberg.literllm/liter-llm">
22
- <img src="https://img.shields.io/maven-central/v/dev.kreuzberg.literllm/liter-llm?label=Java&color=007ec6" alt="Java" />
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" />
23
30
  </a>
24
- <a href="https://github.com/kreuzberg-dev/liter-llm/tree/main/packages/go">
25
- <img src="https://img.shields.io/github/v/tag/kreuzberg-dev/liter-llm?label=Go&color=007ec6" alt="Go" />
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" />
26
33
  </a>
27
34
  <a href="https://www.nuget.org/packages/LiterLlm">
28
35
  <img src="https://img.shields.io/nuget/v/LiterLlm?label=C%23&color=007ec6" alt="C#" />
29
36
  </a>
30
- <a href="https://packagist.org/packages/kreuzberg-dev/liter-llm">
31
- <img src="https://img.shields.io/packagist/v/kreuzberg-dev/liter-llm?label=PHP&color=007ec6" alt="PHP" />
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" />
32
39
  </a>
33
40
  <a href="https://rubygems.org/gems/liter_llm">
34
41
  <img src="https://img.shields.io/gem/v/liter_llm?label=Ruby&color=007ec6" alt="Ruby" />
@@ -36,28 +43,28 @@
36
43
  <a href="https://hex.pm/packages/liter_llm">
37
44
  <img src="https://img.shields.io/hexpm/v/liter_llm?label=Elixir&color=007ec6" alt="Elixir" />
38
45
  </a>
39
- <a href="https://github.com/kreuzberg-dev/liter-llm/pkgs/container/liter-llm">
46
+ <a href="https://github.com/xberg-io/liter-llm/pkgs/container/liter-llm">
40
47
  <img src="https://img.shields.io/badge/Docker-007ec6?logo=docker&logoColor=white" alt="Docker" />
41
48
  </a>
42
- <a href="https://github.com/kreuzberg-dev/homebrew-tap/blob/main/Formula/liter-llm.rb">
49
+ <a href="https://github.com/xberg-io/homebrew-tap/blob/main/Formula/liter-llm.rb">
43
50
  <img src="https://img.shields.io/badge/Homebrew-007ec6?logo=homebrew&logoColor=white" alt="Homebrew" />
44
51
  </a>
45
- <a href="https://github.com/kreuzberg-dev/liter-llm/tree/main/crates/liter-llm-ffi">
52
+ <a href="https://github.com/xberg-io/liter-llm/tree/main/crates/liter-llm-ffi">
46
53
  <img src="https://img.shields.io/badge/C-FFI-007ec6" alt="C FFI" />
47
54
  </a>
48
55
 
49
56
  <!-- Project Info -->
50
- <a href="https://github.com/kreuzberg-dev/liter-llm/blob/main/LICENSE">
57
+ <a href="https://github.com/xberg-io/liter-llm/blob/main/LICENSE">
51
58
  <img src="https://img.shields.io/badge/License-MIT-007ec6" alt="License" />
52
59
  </a>
53
- <a href="https://docs.liter-llm.kreuzberg.dev">
60
+ <a href="https://docs.liter-llm.xberg.io">
54
61
  <img src="https://img.shields.io/badge/Docs-liter--llm-007ec6" alt="Docs" />
55
62
  </a>
56
63
  </div>
57
64
  <div align="center" style="margin: 24px 0 0">
58
- <a href="https://kreuzberg.dev">
65
+ <a href="https://xberg.io">
59
66
  <img
60
- alt="kreuzberg.dev"
67
+ alt="xberg.io"
61
68
  src="https://github.com/user-attachments/assets/1b6c6ad7-3b6d-4171-b1c9-f2026cc9deb8"
62
69
  />
63
70
  </a>
@@ -156,8 +163,8 @@ puts
156
163
 
157
164
  ### Next Steps
158
165
 
159
- - **[Provider Registry](https://github.com/kreuzberg-dev/liter-llm/blob/main/schemas/providers.json)** - Full list of supported providers
160
- - **[GitHub Repository](https://github.com/kreuzberg-dev/liter-llm)** - Source, issues, and discussions
166
+ - **[Provider Registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)** - Full list of supported providers
167
+ - **[GitHub Repository](https://github.com/xberg-io/liter-llm)** - Source, issues, and discussions
161
168
 
162
169
  ## Features
163
170
 
@@ -177,7 +184,7 @@ Route to any provider using the `provider/model` prefix convention:
177
184
  | **Google Vertex** | `vertexai/gemini-1.5-pro` |
178
185
  | **Amazon Bedrock** | `bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0` |
179
186
 
180
- **[Complete Provider List](https://github.com/kreuzberg-dev/liter-llm/blob/main/schemas/providers.json)**
187
+ **[Complete Provider List](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json)**
181
188
 
182
189
  ### Key Capabilities
183
190
 
@@ -211,7 +218,7 @@ groq/llama-3.1-70b-versatile
211
218
  mistral/mistral-large-latest
212
219
  ```
213
220
 
214
- See the [provider registry](https://github.com/kreuzberg-dev/liter-llm/blob/main/schemas/providers.json) for the full list.
221
+ See the [provider registry](https://github.com/xberg-io/liter-llm/blob/main/schemas/providers.json) for the full list.
215
222
 
216
223
  ## Proxy, MCP Server & Plugin
217
224
 
@@ -221,41 +228,41 @@ See the [provider registry](https://github.com/kreuzberg-dev/liter-llm/blob/main
221
228
  Beyond the SDK, the `liter-llm` CLI ships an OpenAI-compatible proxy and a Model Context Protocol (MCP) server:
222
229
 
223
230
  ```bash
224
- brew install kreuzberg-dev/tap/liter-llm # or: cargo install liter-llm-cli
231
+ brew install xberg-io/tap/liter-llm # or: cargo install liter-llm-cli
225
232
  liter-llm api --config liter-llm-proxy.toml # OpenAI-compatible proxy
226
233
  liter-llm mcp --transport stdio # MCP tool server
227
234
 
228
235
  # or run the proxy without installing:
229
- docker run -p 4000:4000 -e LITER_LLM_MASTER_KEY=sk-your-key ghcr.io/kreuzberg-dev/liter-llm
236
+ docker run -p 4000:4000 -e LITER_LLM_MASTER_KEY=sk-your-key ghcr.io/xberg-io/liter-llm
230
237
  ```
231
238
 
232
- To use the MCP server inside a coding agent, install the **liter-llm plugin** from the [`kreuzberg-dev/plugins`](https://github.com/kreuzberg-dev/plugins) marketplace — it auto-registers the server. See the [MCP server](https://docs.liter-llm.kreuzberg.dev/server/mcp-server/) and [proxy server](https://docs.liter-llm.kreuzberg.dev/server/proxy-server/) guides for configuration, CLI usage, and agent integration.
239
+ To use the MCP server inside a coding agent, install the **liter-llm plugin** from the [`xberg-io/plugins`](https://github.com/xberg-io/plugins) marketplace — it auto-registers the server. See the [MCP server](https://docs.liter-llm.xberg.io/server/mcp-server/) and [proxy server](https://docs.liter-llm.xberg.io/server/proxy-server/) guides for configuration, CLI usage, and agent integration.
233
240
 
234
241
  </details>
235
242
 
236
243
  ## Documentation
237
244
 
238
- - **[Documentation](https://docs.liter-llm.kreuzberg.dev)** -- Full docs and API reference
239
- - **[GitHub Repository](https://github.com/kreuzberg-dev/liter-llm)** -- Source, issues, and discussions
240
- - **[Provider Registry](https://github.com/kreuzberg-dev/liter-llm/blob/main/schemas/providers.json)** -- 143 supported providers
245
+ - **[Documentation](https://docs.liter-llm.xberg.io)** -- Full docs and API reference
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
241
248
 
242
- ## Part of Kreuzberg.dev
249
+ ## Part of Xberg.io
243
250
 
244
- - [Kreuzberg](https://github.com/kreuzberg-dev/kreuzberg) — document intelligence: text, tables, metadata from 91+ formats with optional OCR.
245
- - [Kreuzberg Cloud](https://github.com/kreuzberg-dev/kreuzberg-cloud) — managed extraction API with SDKs, dashboards, and observability.
246
- - [kreuzcrawl](https://github.com/kreuzberg-dev/kreuzcrawl) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
247
- - [html-to-markdown](https://github.com/kreuzberg-dev/html-to-markdown) — fast, lossless HTML→Markdown engine.
248
- - [liter-llm](https://github.com/kreuzberg-dev/liter-llm) — universal LLM API client with native bindings for 14 languages and 143 providers.
249
- - [tree-sitter-language-pack](https://github.com/kreuzberg-dev/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
250
- - [alef](https://github.com/kreuzberg-dev/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
251
+ - [Xberg](https://github.com/xberg-io/xberg) — document intelligence: text, tables, metadata from 91+ formats with optional OCR.
252
+ - [Xberg Enterprise](https://github.com/xberg-io/xberg-enterprise) — managed extraction API with SDKs, dashboards, and observability.
253
+ - [crawlberg](https://github.com/xberg-io/crawlberg) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
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.
256
+ - [tree-sitter-language-pack](https://github.com/xberg-io/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
257
+ - [alef](https://github.com/xberg-io/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
251
258
  - [Discord](https://discord.gg/xt9WY3GnKR) — community, roadmap, announcements.
252
259
 
253
260
  ## Contributing
254
261
 
255
- Contributions are welcome! See [CONTRIBUTING.md](https://github.com/kreuzberg-dev/liter-llm/blob/main/CONTRIBUTING.md) for guidelines.
262
+ Contributions are welcome! See [CONTRIBUTING.md](https://github.com/xberg-io/liter-llm/blob/main/CONTRIBUTING.md) for guidelines.
256
263
 
257
264
  Join our [Discord community](https://discord.gg/xt9WY3GnKR) for questions and discussion.
258
265
 
259
266
  ## License
260
267
 
261
- MIT -- see [LICENSE](https://github.com/kreuzberg-dev/liter-llm/blob/main/LICENSE) for details.
268
+ MIT -- see [LICENSE](https://github.com/xberg-io/liter-llm/blob/main/LICENSE) for details.
@@ -1875,9 +1875,9 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
1875
1875
 
1876
1876
  [[package]]
1877
1877
  name = "liter-llm"
1878
- version = "1.8.1"
1878
+ version = "1.9.0-rc.1"
1879
1879
  source = "registry+https://github.com/rust-lang/crates.io-index"
1880
- checksum = "9fa5f699609fb9153fb48d5857b302b25e0088f7ebbb0de5e8847fa442a3315a"
1880
+ checksum = "977673eb3b1be2d3960c8eca3da5587b6ca6bea9156b790f5fadf9b1644b7b5d"
1881
1881
  dependencies = [
1882
1882
  "ahash 0.8.12",
1883
1883
  "async-trait",
@@ -1917,7 +1917,7 @@ dependencies = [
1917
1917
 
1918
1918
  [[package]]
1919
1919
  name = "liter-llm-rb"
1920
- version = "1.8.1"
1920
+ version = "1.9.0-rc.1"
1921
1921
  dependencies = [
1922
1922
  "futures",
1923
1923
  "liter-llm",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "liter-llm-rb"
3
- version = "1.8.1"
3
+ version = "1.9.0-rc.1"
4
4
  edition = "2024"
5
5
  license = "MIT"
6
6
  description = "Universal LLM API client with Rust-powered polyglot bindings."
@@ -24,7 +24,7 @@ wasm-http = ["liter-llm/wasm-http"]
24
24
 
25
25
  [dependencies]
26
26
  futures = "0.3"
27
- liter-llm = { version = "1.8.1", features = ["native-http", "full"] }
27
+ liter-llm = { version = "1.9.0-rc.1", features = ["native-http", "full"] }
28
28
  magnus = "0.8"
29
29
  rb-sys = ">=0.9, <0.9.128"
30
30
  serde = { version = "1", features = ["derive"] }
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:8eac0267a7c84310b2cf7f8e6bc84b23de9f2dc29642b471b8bee9225f5c748a
2
+ // alef:hash:07df79b06f7f819edf0c1dae372b6a8759219fcce15a13259868b5ce5ffdc9b7
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -7630,9 +7630,11 @@ impl magnus::TryConvert for Message {
7630
7630
  })?
7631
7631
  };
7632
7632
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
7633
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
7633
7634
  // If that fails, try treating it as a plain string value and wrap in quotes
7634
7635
  // If both fail, try as Custom variant (for untagged enum support)
7635
7636
  serde_json::from_str(&json_str)
7637
+ .or_else(|_| serde_json::from_value(serde_json::json!({ "role": json_str })))
7636
7638
  .or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
7637
7639
  .or_else(|_| {
7638
7640
  // Try as a JSON string for Custom variant (untagged enums accept any remaining value)
@@ -7723,6 +7725,7 @@ impl magnus::TryConvert for UserContent {
7723
7725
  })?
7724
7726
  };
7725
7727
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
7728
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
7726
7729
  // If that fails, try treating it as a plain string value and wrap in quotes
7727
7730
  // If both fail, try as Custom variant (for untagged enum support)
7728
7731
  serde_json::from_str(&json_str)
@@ -7786,9 +7789,11 @@ impl magnus::TryConvert for ContentPart {
7786
7789
  })?
7787
7790
  };
7788
7791
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
7792
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
7789
7793
  // If that fails, try treating it as a plain string value and wrap in quotes
7790
7794
  // If both fail, try as Custom variant (for untagged enum support)
7791
7795
  serde_json::from_str(&json_str)
7796
+ .or_else(|_| serde_json::from_value(serde_json::json!({ "type": json_str })))
7792
7797
  .or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
7793
7798
  .or_else(|_| {
7794
7799
  // Try as a JSON string for Custom variant (untagged enums accept any remaining value)
@@ -7887,6 +7892,7 @@ impl magnus::TryConvert for AssistantContent {
7887
7892
  })?
7888
7893
  };
7889
7894
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
7895
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
7890
7896
  // If that fails, try treating it as a plain string value and wrap in quotes
7891
7897
  // If both fail, try as Custom variant (for untagged enum support)
7892
7898
  serde_json::from_str(&json_str)
@@ -7947,9 +7953,11 @@ impl magnus::TryConvert for AssistantPart {
7947
7953
  })?
7948
7954
  };
7949
7955
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
7956
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
7950
7957
  // If that fails, try treating it as a plain string value and wrap in quotes
7951
7958
  // If both fail, try as Custom variant (for untagged enum support)
7952
7959
  serde_json::from_str(&json_str)
7960
+ .or_else(|_| serde_json::from_value(serde_json::json!({ "type": json_str })))
7953
7961
  .or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
7954
7962
  .or_else(|_| {
7955
7963
  // Try as a JSON string for Custom variant (untagged enums accept any remaining value)
@@ -8042,6 +8050,7 @@ impl magnus::TryConvert for ToolChoice {
8042
8050
  })?
8043
8051
  };
8044
8052
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8053
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8045
8054
  // If that fails, try treating it as a plain string value and wrap in quotes
8046
8055
  // If both fail, try as Custom variant (for untagged enum support)
8047
8056
  serde_json::from_str(&json_str)
@@ -8146,9 +8155,11 @@ impl magnus::TryConvert for ResponseFormat {
8146
8155
  })?
8147
8156
  };
8148
8157
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8158
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8149
8159
  // If that fails, try treating it as a plain string value and wrap in quotes
8150
8160
  // If both fail, try as Custom variant (for untagged enum support)
8151
8161
  serde_json::from_str(&json_str)
8162
+ .or_else(|_| serde_json::from_value(serde_json::json!({ "type": json_str })))
8152
8163
  .or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
8153
8164
  .or_else(|_| {
8154
8165
  // Try as a JSON string for Custom variant (untagged enums accept any remaining value)
@@ -8202,6 +8213,7 @@ impl magnus::TryConvert for StopSequence {
8202
8213
  })?
8203
8214
  };
8204
8215
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8216
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8205
8217
  // If that fails, try treating it as a plain string value and wrap in quotes
8206
8218
  // If both fail, try as Custom variant (for untagged enum support)
8207
8219
  serde_json::from_str(&json_str)
@@ -8444,6 +8456,7 @@ impl magnus::TryConvert for EmbeddingInput {
8444
8456
  })?
8445
8457
  };
8446
8458
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8459
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8447
8460
  // If that fails, try treating it as a plain string value and wrap in quotes
8448
8461
  // If both fail, try as Custom variant (for untagged enum support)
8449
8462
  serde_json::from_str(&json_str)
@@ -8499,6 +8512,7 @@ impl magnus::TryConvert for ModerationInput {
8499
8512
  })?
8500
8513
  };
8501
8514
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8515
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8502
8516
  // If that fails, try treating it as a plain string value and wrap in quotes
8503
8517
  // If both fail, try as Custom variant (for untagged enum support)
8504
8518
  serde_json::from_str(&json_str)
@@ -8554,6 +8568,7 @@ impl magnus::TryConvert for RerankDocument {
8554
8568
  })?
8555
8569
  };
8556
8570
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8571
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8557
8572
  // If that fails, try treating it as a plain string value and wrap in quotes
8558
8573
  // If both fail, try as Custom variant (for untagged enum support)
8559
8574
  serde_json::from_str(&json_str)
@@ -8572,6 +8587,12 @@ impl magnus::TryConvert for RerankDocument {
8572
8587
  unsafe impl IntoValueFromNative for RerankDocument {}
8573
8588
  unsafe impl TryConvertOwned for RerankDocument {}
8574
8589
 
8590
+ impl RerankDocument {
8591
+ pub fn _factory_object(text: String) -> Self {
8592
+ Self::Object { text }
8593
+ }
8594
+ }
8595
+
8575
8596
  #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
8576
8597
  #[serde(tag = "type")]
8577
8598
  pub enum OcrDocument {
@@ -8613,9 +8634,11 @@ impl magnus::TryConvert for OcrDocument {
8613
8634
  })?
8614
8635
  };
8615
8636
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8637
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8616
8638
  // If that fails, try treating it as a plain string value and wrap in quotes
8617
8639
  // If both fail, try as Custom variant (for untagged enum support)
8618
8640
  serde_json::from_str(&json_str)
8641
+ .or_else(|_| serde_json::from_value(serde_json::json!({ "type": json_str })))
8619
8642
  .or_else(|_| serde_json::from_str(&format!("\"{json_str}\"")))
8620
8643
  .or_else(|_| {
8621
8644
  // Try as a JSON string for Custom variant (untagged enums accept any remaining value)
@@ -8777,6 +8800,7 @@ impl magnus::TryConvert for AuthHeaderFormat {
8777
8800
  })?
8778
8801
  };
8779
8802
  // Try deserializing as JSON first (handles JSON strings like "\"markdown\"" or "{\"click\":{\"selector\":\"...\"}}\"")
8803
+ // For internally-tagged enums, a bare variant string is wrapped as {"<tag>": value}.
8780
8804
  // If that fails, try treating it as a plain string value and wrap in quotes
8781
8805
  // If both fail, try as Custom variant (for untagged enum support)
8782
8806
  serde_json::from_str(&json_str)
@@ -12823,6 +12847,10 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
12823
12847
 
12824
12848
  class.define_method("model", method!(IntentPrototype::model, 0))?;
12825
12849
 
12850
+ let class = module.define_class("RerankDocument", ruby.class_object())?;
12851
+
12852
+ class.define_singleton_method("object", function!(RerankDocument::_factory_object, 1))?;
12853
+
12826
12854
  let class = module.define_class("ChatStreamIterator", ruby.class_object())?;
12827
12855
  class.define_method("next_chunk", method!(ChatStreamIterator::next_chunk, 0))?;
12828
12856
  class.define_method("each", method!(ChatStreamIterator::each, 0))?;
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:8eac0267a7c84310b2cf7f8e6bc84b23de9f2dc29642b471b8bee9225f5c748a
2
+ # alef:hash:07df79b06f7f819edf0c1dae372b6a8759219fcce15a13259868b5ce5ffdc9b7
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:8eac0267a7c84310b2cf7f8e6bc84b23de9f2dc29642b471b8bee9225f5c748a
2
+ # alef:hash:07df79b06f7f819edf0c1dae372b6a8759219fcce15a13259868b5ce5ffdc9b7
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.8.1"
9
+ VERSION = "1.9.0.pre.rc.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:8eac0267a7c84310b2cf7f8e6bc84b23de9f2dc29642b471b8bee9225f5c748a
2
+ # alef:hash:07df79b06f7f819edf0c1dae372b6a8759219fcce15a13259868b5ce5ffdc9b7
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
  # frozen_string_literal: true
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:8eac0267a7c84310b2cf7f8e6bc84b23de9f2dc29642b471b8bee9225f5c748a
2
+ # alef:hash:07df79b06f7f819edf0c1dae372b6a8759219fcce15a13259868b5ce5ffdc9b7
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
 
@@ -838,6 +838,8 @@ module LiterLlm
838
838
  end
839
839
 
840
840
  class RerankDocument
841
+ def self.object: (String text) -> RerankDocument
842
+
841
843
  end
842
844
 
843
845
  class OcrDocument
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.8.1
4
+ version: 1.9.0.pre.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Na'aman Hirschfeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-23 00:00:00.000000000 Z
11
+ date: 2026-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys
@@ -63,7 +63,7 @@ files:
63
63
  - lib/liter_llm/native.rb
64
64
  - lib/liter_llm/version.rb
65
65
  - sig/types.rbs
66
- homepage: https://github.com/kreuzberg-dev/liter-llm
66
+ homepage: https://github.com/xberg-io/liter-llm
67
67
  licenses:
68
68
  - MIT
69
69
  metadata: