python-fastllm 0.0.44__tar.gz → 0.0.46__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.
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/PKG-INFO +1 -2
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/__init__.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/acomplete.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/anthropic.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/chat.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/gemini.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/openai_chat.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/openai_responses.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/responses.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/streaming.py +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/types.py +23 -16
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/pyproject.toml +1 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/python_fastllm.egg-info/PKG-INFO +1 -2
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/python_fastllm.egg-info/requires.txt +0 -1
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/README.md +0 -0
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/_modidx.py +0 -0
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/fastllm/codex.py +0 -0
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/python_fastllm.egg-info/SOURCES.txt +0 -0
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/python_fastllm.egg-info/dependency_links.txt +0 -0
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/python_fastllm.egg-info/entry_points.txt +0 -0
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/python_fastllm.egg-info/top_level.txt +0 -0
- {python_fastllm-0.0.44 → python_fastllm-0.0.46}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-fastllm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.46
|
|
4
4
|
Author-email: Kerem Turgutlu <keremturgutlu@gmail.com>
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Repository, https://github.com/AnswerDotAI/fastllm
|
|
@@ -11,7 +11,6 @@ Requires-Python: >=3.10
|
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: fastcore>=2.1.18
|
|
13
13
|
Requires-Dist: aidialog>=0.0.10
|
|
14
|
-
Requires-Dist: fastspec>=0.2.1
|
|
15
14
|
Requires-Dist: fasttransport>=0.0.2
|
|
16
15
|
Requires-Dist: pillow
|
|
17
16
|
|
|
@@ -10,7 +10,7 @@ import asyncio,json,httpx2
|
|
|
10
10
|
from fastcore.utils import *
|
|
11
11
|
from fastcore.meta import *
|
|
12
12
|
from fasttransport.core import AsyncHttpCli
|
|
13
|
-
from
|
|
13
|
+
from fasttransport.errors import APIError
|
|
14
14
|
|
|
15
15
|
from .types import *
|
|
16
16
|
from aidialog.msg_parts import (Part, PartType, Msg, Text, Thinking, ToolUse, ToolResult, InputImage, InputAudio, InputVideo,
|
|
@@ -12,7 +12,7 @@ import json
|
|
|
12
12
|
from collections import Counter
|
|
13
13
|
from fastcore.utils import *
|
|
14
14
|
from fastcore.meta import *
|
|
15
|
-
from
|
|
15
|
+
from fasttransport.errors import api_error_from_event
|
|
16
16
|
|
|
17
17
|
from .types import *
|
|
18
18
|
from aidialog.msg_parts import (Part, PartType, mk_part, Msg, Text, Thinking, ToolUse, ToolResult, tool_text, ServerToolResult,
|
|
@@ -256,7 +256,7 @@ def _prep_call(self:AsyncChat, search, max_tokens, kwargs, stream=False, think=N
|
|
|
256
256
|
if self.api_key: kwargs['api_key'] = self.api_key
|
|
257
257
|
if self.base_url: kwargs['base_url'] = self.base_url
|
|
258
258
|
if self.endpoint: kwargs['endpoint'] = self.endpoint
|
|
259
|
-
if self.extra_headers: kwargs['
|
|
259
|
+
if self.extra_headers: kwargs['xtra_hdrs'] = self.extra_headers
|
|
260
260
|
kwargs.update(_think_kw(self.model, think, self.vendor_name))
|
|
261
261
|
return max_tokens
|
|
262
262
|
|
|
@@ -12,7 +12,7 @@ import json
|
|
|
12
12
|
from collections import Counter
|
|
13
13
|
from fastcore.utils import *
|
|
14
14
|
from fastcore.meta import *
|
|
15
|
-
from
|
|
15
|
+
from fasttransport.errors import api_error_from_event
|
|
16
16
|
|
|
17
17
|
from .types import *
|
|
18
18
|
from aidialog.msg_parts import (Part, PartType, Msg, Text, Thinking, ToolUse, ToolResult, tool_text,
|
|
@@ -12,7 +12,7 @@ import json
|
|
|
12
12
|
from collections import Counter
|
|
13
13
|
from fastcore.utils import *
|
|
14
14
|
from fastcore.meta import *
|
|
15
|
-
from
|
|
15
|
+
from fasttransport.errors import api_error_from_event
|
|
16
16
|
|
|
17
17
|
from .types import *
|
|
18
18
|
from aidialog.msg_parts import (Part, PartType, Msg, Text, Thinking, Refusal, ToolUse, ToolResult, tool_text,
|
|
@@ -12,7 +12,7 @@ import json
|
|
|
12
12
|
from collections import Counter
|
|
13
13
|
from fastcore.utils import *
|
|
14
14
|
from fastcore.meta import *
|
|
15
|
-
from
|
|
15
|
+
from fasttransport.errors import api_error_from_event
|
|
16
16
|
|
|
17
17
|
from .types import *
|
|
18
18
|
from aidialog.msg_parts import (Completion, Part, PartType, Msg, Text, Thinking, Refusal, ToolUse, ToolResult, tool_text,
|
|
@@ -17,7 +17,7 @@ __all__ = ['ResponsesError', 'response_input', 'normalize_call_ids', 'response_o
|
|
|
17
17
|
# %% ../nbs/06a_responses.ipynb #e16fc24e
|
|
18
18
|
import asyncio, json, secrets, time
|
|
19
19
|
from fastcore.utils import *
|
|
20
|
-
from
|
|
20
|
+
from fasttransport.errors import APIError
|
|
21
21
|
|
|
22
22
|
from .acomplete import acomplete
|
|
23
23
|
from .streaming import Status
|
|
@@ -10,7 +10,7 @@ __all__ = ['Delta', 'norm_and_yield', 'PrintStream', 'PartAccum', 'FenceToolStop
|
|
|
10
10
|
import json,copy
|
|
11
11
|
from fastcore.utils import *
|
|
12
12
|
from fastcore.meta import delegates
|
|
13
|
-
from
|
|
13
|
+
from fasttransport.errors import *
|
|
14
14
|
from .types import *
|
|
15
15
|
from aidialog.msg_parts import Part, PartType, Msg, Text, Thinking, ToolUse, ToolResult, ServerToolResult, mk_part, fence_call_re, Completion
|
|
16
16
|
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
# %% auto #0
|
|
6
6
|
__all__ = ['FinishReason', 'api_registry', 'model_prices_url', 'haik45', 'sonn45', 'sonn46', 'sonn', 'sonn5', 'opus46', 'opus48',
|
|
7
|
-
'opus', 'opus5', 'fable', 'fable5', 'gpt54', 'gpt54m', 'gpt55', 'codex54', 'codex54m', 'codex55',
|
|
8
|
-
'codex53spark', 'model_info_registry', 'modern_llm', 'deepseek_v4_common', '
|
|
9
|
-
'codex_pricing', 'sol', 'terra', 'luna', 'gpt56s', 'Usage', 'APIRegistry',
|
|
10
|
-
'payload_kwargs', 'provider_req', 'get_api_key', 'wrap_typed', 'unwrap_typed',
|
|
11
|
-
'model_prices_meta', 'infer_api_name', 'get_model_meta', 'register_model_info',
|
|
12
|
-
'get_model_pricing', 'approx_pricing', 'is_deepseek_peak_hour', 'price_tier', 'tier_rate']
|
|
7
|
+
'opus', 'opus5', 'fable', 'fable5', 'fable51', 'gpt54', 'gpt54m', 'gpt55', 'codex54', 'codex54m', 'codex55',
|
|
8
|
+
'codex53spark', 'model_info_registry', 'modern_llm', 'deepseek_v4_common', 'deepseek_v4_flash_prices',
|
|
9
|
+
'mimo_v25_common', 'codex_pricing', 'sol', 'terra', 'luna', 'gpt56s', 'Usage', 'APIRegistry',
|
|
10
|
+
'mk_completion', 'fn_schema', 'payload_kwargs', 'provider_req', 'get_api_key', 'wrap_typed', 'unwrap_typed',
|
|
11
|
+
'resize_b64', 'model_prices_meta', 'infer_api_name', 'get_model_meta', 'register_model_info',
|
|
12
|
+
'get_model_info', 'get_model_pricing', 'approx_pricing', 'is_deepseek_peak_hour', 'price_tier', 'tier_rate']
|
|
13
13
|
|
|
14
14
|
# %% ../nbs/00_types.ipynb #b4d047fd
|
|
15
15
|
import httpx2, base64, io
|
|
16
16
|
from fasttransport.core import AsyncHttpCli
|
|
17
|
-
import
|
|
17
|
+
import fasttransport.errors # patches httpx2 exceptions with .api_error(), which provider_req relies on
|
|
18
18
|
from importlib.metadata import entry_points
|
|
19
19
|
from datetime import datetime, timezone
|
|
20
20
|
from fastcore.utils import *
|
|
@@ -186,6 +186,7 @@ opus46 = "claude-opus-4-6"
|
|
|
186
186
|
opus48 = "claude-opus-4-8"
|
|
187
187
|
opus = opus5 = "claude-opus-5"
|
|
188
188
|
fable = fable5 = 'claude-fable-5'
|
|
189
|
+
fable51 = 'claude-fable-5-1'
|
|
189
190
|
gpt54 = "gpt-5.4"
|
|
190
191
|
gpt54m = "gpt-5.4-mini"
|
|
191
192
|
gpt55 = "gpt-5.5"
|
|
@@ -258,14 +259,18 @@ register_model_info('kimi-k3', vendor_name='moonshot', base='kimi-k2.6', support
|
|
|
258
259
|
max_input_tokens=1_000_000, input_cost_per_token=3e-6, cache_read_input_token_cost=0.30e-6, output_cost_per_token=15.0e-6)
|
|
259
260
|
|
|
260
261
|
# %% ../nbs/00_types.ipynb #948d55d0
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
register_model_info('deepseek-v4-
|
|
267
|
-
|
|
268
|
-
|
|
262
|
+
# The price map carries DeepSeek's peak rates, and `Completion.cost` doubles at peak, so register the off-peak rates
|
|
263
|
+
deepseek_v4_common = dict(supports_native_structured_output=True, max_input_tokens=1048576)
|
|
264
|
+
deepseek_v4_flash_prices = dict(input_cost_per_token=0.22e-6, input_cost_per_token_cache_hit=0.007e-6,
|
|
265
|
+
cache_read_input_token_cost=0.007e-6, output_cost_per_token=0.66e-6)
|
|
266
|
+
|
|
267
|
+
register_model_info('deepseek-v4-flash', vendor_name='deepseek', base='deepseek-v4-flash',
|
|
268
|
+
**deepseek_v4_common, **deepseek_v4_flash_prices)
|
|
269
|
+
register_model_info('deepseek-v4-flash-vision-exp', vendor_name='deepseek', base='deepseek-v4-flash-vision-exp',
|
|
270
|
+
**deepseek_v4_common, **deepseek_v4_flash_prices, supports_image_input=True)
|
|
271
|
+
register_model_info('deepseek-v4-pro', vendor_name='deepseek', base='deepseek-v4-pro', **deepseek_v4_common,
|
|
272
|
+
input_cost_per_token=0.66e-6, input_cost_per_token_cache_hit=0.022e-6,
|
|
273
|
+
cache_read_input_token_cost=0.022e-6, output_cost_per_token=1.98e-6)
|
|
269
274
|
|
|
270
275
|
mimo_v25_common = dict(**modern_llm, supports_web_search=True, max_input_tokens=1048576, max_output_tokens=131072, max_tokens=131072)
|
|
271
276
|
|
|
@@ -310,7 +315,9 @@ register_model_info(codex53spark, 'codex', **codex_pricing,
|
|
|
310
315
|
max_tokens=128000, max_input_tokens=128000, max_output_tokens=128000)
|
|
311
316
|
|
|
312
317
|
# %% ../nbs/00_types.ipynb #5d3e4720
|
|
313
|
-
|
|
318
|
+
# Fable 5.1 isn't in the price map yet; it prices and behaves like Fable 5
|
|
319
|
+
register_model_info(fable51, 'anthropic', base=fable5)
|
|
320
|
+
for model in (haik45, sonn45, sonn46, sonn5, opus46, opus48, opus5, fable5, fable51):
|
|
314
321
|
register_model_info(model, 'claude_code', base=model, base_vendor_name='anthropic', **codex_pricing)
|
|
315
322
|
|
|
316
323
|
# %% ../nbs/00_types.ipynb #bb0c4c2a
|
|
@@ -15,7 +15,7 @@ classifiers = [
|
|
|
15
15
|
"Programming Language :: Python :: 3",
|
|
16
16
|
"Programming Language :: Python :: 3 :: Only",
|
|
17
17
|
]
|
|
18
|
-
dependencies = ['fastcore>=2.1.18', 'aidialog>=0.0.10', '
|
|
18
|
+
dependencies = ['fastcore>=2.1.18', 'aidialog>=0.0.10', 'fasttransport>=0.0.2', 'pillow']
|
|
19
19
|
|
|
20
20
|
[project.urls]
|
|
21
21
|
Repository = "https://github.com/AnswerDotAI/fastllm"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-fastllm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.46
|
|
4
4
|
Author-email: Kerem Turgutlu <keremturgutlu@gmail.com>
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Project-URL: Repository, https://github.com/AnswerDotAI/fastllm
|
|
@@ -11,7 +11,6 @@ Requires-Python: >=3.10
|
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: fastcore>=2.1.18
|
|
13
13
|
Requires-Dist: aidialog>=0.0.10
|
|
14
|
-
Requires-Dist: fastspec>=0.2.1
|
|
15
14
|
Requires-Dist: fasttransport>=0.0.2
|
|
16
15
|
Requires-Dist: pillow
|
|
17
16
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fastllm-0.0.44 → python_fastllm-0.0.46}/python_fastllm.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|