dot-inference 2.1.0__tar.gz → 2.2.0__tar.gz
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.
- {dot_inference-2.1.0 → dot_inference-2.2.0}/CHANGELOG.md +11 -1
- {dot_inference-2.1.0 → dot_inference-2.2.0}/PKG-INFO +2 -1
- {dot_inference-2.1.0 → dot_inference-2.2.0}/README.md +1 -0
- dot_inference-2.2.0/docs/provider-quirks/openrouter-errors.md +19 -0
- dot_inference-2.2.0/docs/provider-quirks/tool-choice.md +31 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/pyproject.toml +1 -1
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/models.yaml +113 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/uv.lock +1 -1
- {dot_inference-2.1.0 → dot_inference-2.2.0}/.env.template +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/.gitignore +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/.gitlab-ci.yml +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/.pre-commit-config.yaml +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/.python-version +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/AUTHORS.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/CONTRIBUTING.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/DCO +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/LICENSE.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/docs/ARCHITECTURE.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/docs/DEVELOPMENT.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/docs/PUBLISHING.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/docs/VERSIONING.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/examples/demo.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/examples/demo_streaming.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/examples/doc_stream.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/scripts/test_all_models.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/README.md +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/__init__.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_client.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_cost_tracker.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_llm_registry.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_local_check.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_mistral_compat.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_openai_compat.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_rate_limit.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_retry.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_sync.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/_types.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/mock.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/src/dot_inference/settings.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/__init__.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_cost_tracker.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_factories.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_llm_registry.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_local_check.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_mistral_compat.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_mistral_live.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_openai_compat.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_rate_limit.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_retry.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_settings.py +0 -0
- {dot_inference-2.1.0 → dot_inference-2.2.0}/tests/test_types.py +0 -0
|
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.2.0] - 2026-10-08
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Models: `anthropic/claude-haiku-5.5`, `anthropic/claude-sonnet-5.5`,
|
|
15
|
+
`anthropic/claude-opus-5.5`, `openai/gpt-6-luna`, `openai/gpt-6.1-sol`,
|
|
16
|
+
`google/gemini-3.8-flash` and `mistral/mistral-large-4` (public preview;
|
|
17
|
+
`reasoning_effort` `none` or `high`, the default).
|
|
18
|
+
|
|
10
19
|
## [2.1.0] - 2026-10-07
|
|
11
20
|
|
|
12
21
|
### Added
|
|
@@ -98,7 +107,8 @@ this release.
|
|
|
98
107
|
- `LLMCallable` and `EmbeddingCallable` return a `Coroutine` rather than the
|
|
99
108
|
looser `Awaitable`, matching what `asyncio.run_coroutine_threadsafe` accepts.
|
|
100
109
|
|
|
101
|
-
[Unreleased]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference/-/compare/v2.
|
|
110
|
+
[Unreleased]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference/-/compare/v2.2.0...main
|
|
111
|
+
[2.2.0]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference/-/tags/v2.2.0
|
|
102
112
|
[2.1.0]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference/-/tags/v2.1.0
|
|
103
113
|
[2.0.3]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference/-/tags/v2.0.3
|
|
104
114
|
[2.0.2]: https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference/-/tags/v2.0.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: dot-inference
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Unified async Python library for LLM inference and embeddings across multiple providers
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference
|
|
6
6
|
Project-URL: Repository, https://gitlab.com/deepika6190303/deepika-open-toolbox/dot-inference
|
|
@@ -332,6 +332,7 @@ See [docs/VERSIONING.md](docs/VERSIONING.md) for the full policy.
|
|
|
332
332
|
| [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) | Environment setup, tests, code style |
|
|
333
333
|
| [docs/VERSIONING.md](docs/VERSIONING.md) | Versioning, deprecation policy, how to depend on this package |
|
|
334
334
|
| [docs/PUBLISHING.md](docs/PUBLISHING.md) | Cutting a release |
|
|
335
|
+
| [docs/provider-quirks/](docs/provider-quirks/) | Provider behaviours that differ from the OpenAI format: `tool_choice` support, OpenRouter error bodies |
|
|
335
336
|
| [CHANGELOG.md](CHANGELOG.md) | Release history |
|
|
336
337
|
|
|
337
338
|
## Contributing
|
|
@@ -305,6 +305,7 @@ See [docs/VERSIONING.md](docs/VERSIONING.md) for the full policy.
|
|
|
305
305
|
| [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) | Environment setup, tests, code style |
|
|
306
306
|
| [docs/VERSIONING.md](docs/VERSIONING.md) | Versioning, deprecation policy, how to depend on this package |
|
|
307
307
|
| [docs/PUBLISHING.md](docs/PUBLISHING.md) | Cutting a release |
|
|
308
|
+
| [docs/provider-quirks/](docs/provider-quirks/) | Provider behaviours that differ from the OpenAI format: `tool_choice` support, OpenRouter error bodies |
|
|
308
309
|
| [CHANGELOG.md](CHANGELOG.md) | Release history |
|
|
309
310
|
|
|
310
311
|
## Contributing
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# OpenRouter error bodies
|
|
2
|
+
|
|
3
|
+
OpenRouter translates requests into each provider's format, but passes the
|
|
4
|
+
provider's error back untranslated, wrapped in a generic envelope
|
|
5
|
+
([Errors and debugging](https://openrouter.ai/docs/api/reference/errors-and-debugging#provider-errors)):
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{"error": {"code": 400, "message": "Provider returned error",
|
|
9
|
+
"metadata": {"raw": "<the provider's error body, verbatim>",
|
|
10
|
+
"provider_name": "Anthropic"}}}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- `message` is generic; the actual cause is in `metadata.raw`.
|
|
14
|
+
- `metadata.raw` uses the provider's vocabulary, not the OpenAI one used in
|
|
15
|
+
the request. Example: a `tool_choice: "required"` refused by Anthropic is
|
|
16
|
+
reported as `type "tool" and "any" are not supported` (see
|
|
17
|
+
[tool-choice.md](tool-choice.md)).
|
|
18
|
+
- `metadata.provider_name` names the provider that failed — useful when
|
|
19
|
+
routing is not pinned with `provider_routing`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# `tool_choice` across providers
|
|
2
|
+
|
|
3
|
+
dot-inference sends `tool_choice` in OpenAI format. Its meaning
|
|
4
|
+
([OpenAI](https://platform.openai.com/docs/guides/function-calling),
|
|
5
|
+
[OpenRouter](https://openrouter.ai/docs/guides/features/tool-calling#tool-choice-configuration)):
|
|
6
|
+
|
|
7
|
+
| Value | Meaning |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `"auto"` | The model calls tools or answers in text, as it decides. Default when `tools` is given. |
|
|
10
|
+
| `"none"` | Tools stay in the request but the model must answer in text. Keeps the prompt (and its cache) identical to a tool-calling turn — e.g. a summarisation step. |
|
|
11
|
+
| `"required"` | The model must call at least one tool. |
|
|
12
|
+
| `{"type": "function", "function": {"name": "X"}}` | The model must call tool `X`. |
|
|
13
|
+
|
|
14
|
+
## Anthropic models via OpenRouter
|
|
15
|
+
|
|
16
|
+
OpenRouter translates the request into Anthropic's format
|
|
17
|
+
([Anthropic `tool_choice`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#forcing-tool-use)):
|
|
18
|
+
`"required"` becomes `{"type": "any"}` and a named function becomes
|
|
19
|
+
`{"type": "tool", "name": "X"}`.
|
|
20
|
+
|
|
21
|
+
Anthropic does not support forced tool use (`any`, `tool`) on **Claude Opus
|
|
22
|
+
5.5, Sonnet 5.5, Fable 5.1**, nor with manual extended thinking. These calls
|
|
23
|
+
fail with a 400 — `auto` and `none` still work. Haiku 5.5 and the 4.x models
|
|
24
|
+
accept it. Observed 2026-10-08 through OpenRouter:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
tool_choice: type "tool" and "any" are not supported for this model.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The message names Anthropic's types, not the `"required"` that was sent: see
|
|
31
|
+
[openrouter-errors.md](openrouter-errors.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dot-inference"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.2.0"
|
|
4
4
|
description = "Unified async Python library for LLM inference and embeddings across multiple providers"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Kannon For Deep Tech", email = "louis.letarnec@deepika.ai" }]
|
|
@@ -221,6 +221,39 @@ openai/gpt-5.4:
|
|
|
221
221
|
provider_routing:
|
|
222
222
|
only: ["openai"]
|
|
223
223
|
|
|
224
|
+
# GPT-6 Luna (September 2026): the fast, low-cost tier of the GPT-6 series.
|
|
225
|
+
openai/gpt-6-luna:
|
|
226
|
+
supports_strict_json: true
|
|
227
|
+
supports_reasoning: true
|
|
228
|
+
input_token_cost: 1e-7 # $0.10/M
|
|
229
|
+
output_token_cost: 5e-7 # $0.50/M
|
|
230
|
+
context_window: 1050000
|
|
231
|
+
providers:
|
|
232
|
+
openai:
|
|
233
|
+
api_model_name: gpt-6-luna
|
|
234
|
+
openrouter:
|
|
235
|
+
api_model_name: openai/gpt-6-luna
|
|
236
|
+
features:
|
|
237
|
+
provider_routing:
|
|
238
|
+
only: ["openai"]
|
|
239
|
+
|
|
240
|
+
# GPT-6.1 Sol (September 2026): the mid tier of the GPT-6 series, below
|
|
241
|
+
# GPT-6 Astra; an upgrade of GPT-6 Sol at the same price.
|
|
242
|
+
openai/gpt-6.1-sol:
|
|
243
|
+
supports_strict_json: true
|
|
244
|
+
supports_reasoning: true
|
|
245
|
+
input_token_cost: 2e-6 # $2/M
|
|
246
|
+
output_token_cost: 1e-5 # $10/M
|
|
247
|
+
context_window: 1050000
|
|
248
|
+
providers:
|
|
249
|
+
openai:
|
|
250
|
+
api_model_name: gpt-6.1-sol
|
|
251
|
+
openrouter:
|
|
252
|
+
api_model_name: openai/gpt-6.1-sol
|
|
253
|
+
features:
|
|
254
|
+
provider_routing:
|
|
255
|
+
only: ["openai"]
|
|
256
|
+
|
|
224
257
|
openai/gpt-oss-120b:
|
|
225
258
|
supports_strict_json: true
|
|
226
259
|
supports_reasoning: true
|
|
@@ -273,6 +306,17 @@ google/gemini-3-pro:
|
|
|
273
306
|
openrouter:
|
|
274
307
|
api_model_name: google/gemini-3.1-pro-preview
|
|
275
308
|
|
|
309
|
+
# Gemini 3.8 Flash (September 2026).
|
|
310
|
+
google/gemini-3.8-flash:
|
|
311
|
+
supports_strict_json: true
|
|
312
|
+
supports_reasoning: true
|
|
313
|
+
input_token_cost: 7.5e-7 # $0.75/M
|
|
314
|
+
output_token_cost: 3.75e-6 # $3.75/M
|
|
315
|
+
context_window: 1048576
|
|
316
|
+
providers:
|
|
317
|
+
openrouter:
|
|
318
|
+
api_model_name: google/gemini-3.8-flash
|
|
319
|
+
|
|
276
320
|
# Gemma 4 31B (v26.04, April 2026): open-weight (Apache 2.0) dense multimodal
|
|
277
321
|
# model with native function calling, structured outputs, and a configurable
|
|
278
322
|
# reasoning mode. Served across providers on OpenRouter.
|
|
@@ -305,6 +349,29 @@ mistral/mistral-large-latest:
|
|
|
305
349
|
provider_routing:
|
|
306
350
|
only: ["mistral"]
|
|
307
351
|
|
|
352
|
+
# Mistral Large 4 (v26.10, public preview since October 2026): open-weight
|
|
353
|
+
# multimodal MoE (1.05T parameters). Pinned ID: on La Plateforme
|
|
354
|
+
# mistral-large-latest still resolves to Large 3 (mistral-large-2512).
|
|
355
|
+
mistral/mistral-large-4:
|
|
356
|
+
default_provider: mistral
|
|
357
|
+
supports_strict_json: true
|
|
358
|
+
# Adjustable reasoning, same contract as Medium 3.5: La Plateforme accepts
|
|
359
|
+
# only "none" and "high", and thinks ("high") when none is given.
|
|
360
|
+
supports_reasoning: true
|
|
361
|
+
reasoning_effort_options: [none, high]
|
|
362
|
+
default_reasoning_effort: high
|
|
363
|
+
input_token_cost: 6.8e-7 # $0.68/M (preview price; list $1.36/M)
|
|
364
|
+
output_token_cost: 2.09e-6 # $2.09/M (preview price; list $4.18/M)
|
|
365
|
+
context_window: 524288
|
|
366
|
+
providers:
|
|
367
|
+
mistral:
|
|
368
|
+
api_model_name: mistral-large-4
|
|
369
|
+
openrouter:
|
|
370
|
+
api_model_name: mistralai/mistral-large-4-0
|
|
371
|
+
features:
|
|
372
|
+
provider_routing:
|
|
373
|
+
only: ["mistral"]
|
|
374
|
+
|
|
308
375
|
|
|
309
376
|
# Alias — always resolves to the latest Mistral Small release.
|
|
310
377
|
# Use this when you want automatic upgrades as Mistral ships new versions.
|
|
@@ -483,3 +550,49 @@ anthropic/claude-opus-4.6:
|
|
|
483
550
|
features:
|
|
484
551
|
provider_routing:
|
|
485
552
|
only: ["anthropic"]
|
|
553
|
+
|
|
554
|
+
# Claude Haiku 5.5 (October 2026). Priced by prompt length: the costs below
|
|
555
|
+
# apply up to 100K prompt tokens; above, Anthropic bills $0.50/M input and
|
|
556
|
+
# $2.50/M output. OpenRouter reports the billed cost, which takes precedence
|
|
557
|
+
# over this estimate.
|
|
558
|
+
anthropic/claude-haiku-5.5:
|
|
559
|
+
supports_strict_json: true
|
|
560
|
+
supports_reasoning: true
|
|
561
|
+
requires_cache_control: true
|
|
562
|
+
input_token_cost: 1e-7 # $0.10/M
|
|
563
|
+
output_token_cost: 5e-7 # $0.50/M
|
|
564
|
+
context_window: 1000000
|
|
565
|
+
providers:
|
|
566
|
+
openrouter:
|
|
567
|
+
api_model_name: anthropic/claude-haiku-5.5
|
|
568
|
+
features:
|
|
569
|
+
provider_routing:
|
|
570
|
+
only: ["anthropic"]
|
|
571
|
+
|
|
572
|
+
anthropic/claude-sonnet-5.5:
|
|
573
|
+
supports_strict_json: true
|
|
574
|
+
supports_reasoning: true
|
|
575
|
+
requires_cache_control: true
|
|
576
|
+
input_token_cost: 2e-6 # $2/M
|
|
577
|
+
output_token_cost: 1e-5 # $10/M
|
|
578
|
+
context_window: 1000000
|
|
579
|
+
providers:
|
|
580
|
+
openrouter:
|
|
581
|
+
api_model_name: anthropic/claude-sonnet-5.5
|
|
582
|
+
features:
|
|
583
|
+
provider_routing:
|
|
584
|
+
only: ["anthropic"]
|
|
585
|
+
|
|
586
|
+
anthropic/claude-opus-5.5:
|
|
587
|
+
supports_strict_json: true
|
|
588
|
+
supports_reasoning: true
|
|
589
|
+
requires_cache_control: true
|
|
590
|
+
input_token_cost: 4e-6 # $4/M
|
|
591
|
+
output_token_cost: 2e-5 # $20/M
|
|
592
|
+
context_window: 1000000
|
|
593
|
+
providers:
|
|
594
|
+
openrouter:
|
|
595
|
+
api_model_name: anthropic/claude-opus-5.5
|
|
596
|
+
features:
|
|
597
|
+
provider_routing:
|
|
598
|
+
only: ["anthropic"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|