python-fastllm 0.0.45__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.
Files changed (22) hide show
  1. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/PKG-INFO +1 -1
  2. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/__init__.py +1 -1
  3. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/chat.py +1 -1
  4. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/types.py +22 -15
  5. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/python_fastllm.egg-info/PKG-INFO +1 -1
  6. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/README.md +0 -0
  7. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/_modidx.py +0 -0
  8. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/acomplete.py +0 -0
  9. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/anthropic.py +0 -0
  10. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/codex.py +0 -0
  11. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/gemini.py +0 -0
  12. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/openai_chat.py +0 -0
  13. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/openai_responses.py +0 -0
  14. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/responses.py +0 -0
  15. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/fastllm/streaming.py +0 -0
  16. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/pyproject.toml +0 -0
  17. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/python_fastllm.egg-info/SOURCES.txt +0 -0
  18. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/python_fastllm.egg-info/dependency_links.txt +0 -0
  19. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/python_fastllm.egg-info/entry_points.txt +0 -0
  20. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/python_fastllm.egg-info/requires.txt +0 -0
  21. {python_fastllm-0.0.45 → python_fastllm-0.0.46}/python_fastllm.egg-info/top_level.txt +0 -0
  22. {python_fastllm-0.0.45 → 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.45
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
@@ -2,4 +2,4 @@
2
2
 
3
3
  - `fastllm.responses`: Provider-independent Responses resources and streaming over FastLLM"""
4
4
 
5
- __version__ = "0.0.45"
5
+ __version__ = "0.0.46"
@@ -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['xtra_headers'] = self.extra_headers
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
 
@@ -4,12 +4,12 @@
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', 'mimo_v25_common',
9
- 'codex_pricing', 'sol', 'terra', 'luna', 'gpt56s', 'Usage', 'APIRegistry', 'mk_completion', 'fn_schema',
10
- 'payload_kwargs', 'provider_req', 'get_api_key', 'wrap_typed', 'unwrap_typed', 'resize_b64',
11
- 'model_prices_meta', 'infer_api_name', 'get_model_meta', 'register_model_info', 'get_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
@@ -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
- deepseek_v4_common = dict(**modern_llm, max_input_tokens=1048576, max_output_tokens=393216, max_tokens=393216)
262
-
263
- register_model_info('deepseek-v4-flash', vendor_name='deepseek', base='deepseek/deepseek-v3.2', **deepseek_v4_common,
264
- input_cost_per_token=1.4e-07, input_cost_per_token_cache_hit=2.8e-09,
265
- output_cost_per_token=2.8e-07, cache_read_input_token_cost=1.4e-07/10)
266
- register_model_info('deepseek-v4-pro', vendor_name='deepseek', base='deepseek/deepseek-v3.2', **deepseek_v4_common,
267
- input_cost_per_token=4.35e-07, input_cost_per_token_cache_hit=3.625e-09,
268
- output_cost_per_token=8.7e-07, cache_read_input_token_cost=4.35e-07/10)
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
- for model in (haik45, sonn45, sonn46, sonn5, opus46, opus48, opus5, fable5):
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-fastllm
3
- Version: 0.0.45
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