OneLLM 0.1.1__tar.gz → 0.1.2__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 (60) hide show
  1. {onellm-0.1.1 → onellm-0.1.2/OneLLM.egg-info}/PKG-INFO +1 -1
  2. {onellm-0.1.1/OneLLM.egg-info → onellm-0.1.2}/PKG-INFO +1 -1
  3. onellm-0.1.2/onellm/.version +1 -0
  4. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/openai.py +16 -0
  5. onellm-0.1.1/onellm/.version +0 -1
  6. {onellm-0.1.1 → onellm-0.1.2}/LICENSE +0 -0
  7. {onellm-0.1.1 → onellm-0.1.2}/MANIFEST.in +0 -0
  8. {onellm-0.1.1 → onellm-0.1.2}/OneLLM.egg-info/SOURCES.txt +0 -0
  9. {onellm-0.1.1 → onellm-0.1.2}/OneLLM.egg-info/dependency_links.txt +0 -0
  10. {onellm-0.1.1 → onellm-0.1.2}/OneLLM.egg-info/top_level.txt +0 -0
  11. {onellm-0.1.1 → onellm-0.1.2}/README.md +0 -0
  12. {onellm-0.1.1 → onellm-0.1.2}/onellm/__init__.py +0 -0
  13. {onellm-0.1.1 → onellm-0.1.2}/onellm/audio.py +0 -0
  14. {onellm-0.1.1 → onellm-0.1.2}/onellm/chat_completion.py +0 -0
  15. {onellm-0.1.1 → onellm-0.1.2}/onellm/cli/__init__.py +0 -0
  16. {onellm-0.1.1 → onellm-0.1.2}/onellm/cli/download_model.py +0 -0
  17. {onellm-0.1.1 → onellm-0.1.2}/onellm/client.py +0 -0
  18. {onellm-0.1.1 → onellm-0.1.2}/onellm/completion.py +0 -0
  19. {onellm-0.1.1 → onellm-0.1.2}/onellm/config.py +0 -0
  20. {onellm-0.1.1 → onellm-0.1.2}/onellm/embedding.py +0 -0
  21. {onellm-0.1.1 → onellm-0.1.2}/onellm/errors.py +0 -0
  22. {onellm-0.1.1 → onellm-0.1.2}/onellm/files.py +0 -0
  23. {onellm-0.1.1 → onellm-0.1.2}/onellm/image.py +0 -0
  24. {onellm-0.1.1 → onellm-0.1.2}/onellm/models.py +0 -0
  25. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/__init__.py +0 -0
  26. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/anthropic.py +0 -0
  27. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/anyscale.py +0 -0
  28. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/azure.py +0 -0
  29. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/base.py +0 -0
  30. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/bedrock.py +0 -0
  31. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/cohere.py +0 -0
  32. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/deepseek.py +0 -0
  33. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/fallback.py +0 -0
  34. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/fireworks.py +0 -0
  35. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/google.py +0 -0
  36. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/groq.py +0 -0
  37. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/llama_cpp.py +0 -0
  38. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/mistral.py +0 -0
  39. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/moonshot.py +0 -0
  40. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/ollama.py +0 -0
  41. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/openai_compatible.py +0 -0
  42. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/openrouter.py +0 -0
  43. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/perplexity.py +0 -0
  44. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/together.py +0 -0
  45. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/vertexai.py +0 -0
  46. {onellm-0.1.1 → onellm-0.1.2}/onellm/providers/xai.py +0 -0
  47. {onellm-0.1.1 → onellm-0.1.2}/onellm/speech.py +0 -0
  48. {onellm-0.1.1 → onellm-0.1.2}/onellm/types/__init__.py +0 -0
  49. {onellm-0.1.1 → onellm-0.1.2}/onellm/types/common.py +0 -0
  50. {onellm-0.1.1 → onellm-0.1.2}/onellm/utils/__init__.py +0 -0
  51. {onellm-0.1.1 → onellm-0.1.2}/onellm/utils/fallback.py +0 -0
  52. {onellm-0.1.1 → onellm-0.1.2}/onellm/utils/retry.py +0 -0
  53. {onellm-0.1.1 → onellm-0.1.2}/onellm/utils/streaming.py +0 -0
  54. {onellm-0.1.1 → onellm-0.1.2}/onellm/utils/text_cleaner.py +0 -0
  55. {onellm-0.1.1 → onellm-0.1.2}/onellm/utils/token_counter.py +0 -0
  56. {onellm-0.1.1 → onellm-0.1.2}/onellm/validators.py +0 -0
  57. {onellm-0.1.1 → onellm-0.1.2}/pyproject.toml +0 -0
  58. {onellm-0.1.1 → onellm-0.1.2}/setup.cfg +0 -0
  59. {onellm-0.1.1 → onellm-0.1.2}/setup.py +0 -0
  60. {onellm-0.1.1 → onellm-0.1.2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onellm
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: A unified interface for interacting with large language models from various providers - a complete drop-in replacement for OpenAI's client
5
5
  Home-page: https://github.com/muxi-ai/onellm
6
6
  Author: Ran Aroussi
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onellm
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: A unified interface for interacting with large language models from various providers - a complete drop-in replacement for OpenAI's client
5
5
  Home-page: https://github.com/muxi-ai/onellm
6
6
  Author: Ran Aroussi
@@ -0,0 +1 @@
1
+ 0.1.2
@@ -376,6 +376,14 @@ class OpenAIProvider(Provider):
376
376
  # Process messages for vision models if needed
377
377
  processed_messages = self._process_messages_for_vision(messages, model)
378
378
 
379
+ # Handle max_tokens -> max_completion_tokens renaming for OpenAI API
380
+ if "max_tokens" in kwargs:
381
+ kwargs["max_completion_tokens"] = kwargs.pop("max_tokens")
382
+
383
+ # Remove temperature for GPT-5 and o-series models that don't support it
384
+ if model.startswith("gpt-5") or model.startswith("o"):
385
+ kwargs.pop("temperature", None)
386
+
379
387
  # Set up the request data
380
388
  data = {
381
389
  "model": model,
@@ -573,6 +581,14 @@ class OpenAIProvider(Provider):
573
581
  Returns:
574
582
  CompletionResponse or generator yielding completion chunks
575
583
  """
584
+ # Handle max_tokens -> max_completion_tokens renaming for OpenAI API
585
+ if "max_tokens" in kwargs:
586
+ kwargs["max_completion_tokens"] = kwargs.pop("max_tokens")
587
+
588
+ # Remove temperature for GPT-5 and o-series models that don't support it
589
+ if model.startswith("gpt-5") or model.startswith("o"):
590
+ kwargs.pop("temperature", None)
591
+
576
592
  # Prepare request data with all parameters
577
593
  request_data = {"model": model, "prompt": prompt, "stream": stream, **kwargs}
578
594
 
@@ -1 +0,0 @@
1
- 0.1.1
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