OneLLM 0.1.0__tar.gz → 0.1.1__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.0 → onellm-0.1.1/OneLLM.egg-info}/PKG-INFO +8 -7
  2. {onellm-0.1.0 → onellm-0.1.1}/OneLLM.egg-info/SOURCES.txt +1 -0
  3. {onellm-0.1.0/OneLLM.egg-info → onellm-0.1.1}/PKG-INFO +8 -7
  4. {onellm-0.1.0 → onellm-0.1.1}/README.md +7 -6
  5. onellm-0.1.1/onellm/.version +1 -0
  6. {onellm-0.1.0 → onellm-0.1.1}/onellm/config.py +7 -0
  7. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/__init__.py +2 -0
  8. onellm-0.1.1/onellm/providers/moonshot.py +60 -0
  9. onellm-0.1.0/onellm/.version +0 -1
  10. {onellm-0.1.0 → onellm-0.1.1}/LICENSE +0 -0
  11. {onellm-0.1.0 → onellm-0.1.1}/MANIFEST.in +0 -0
  12. {onellm-0.1.0 → onellm-0.1.1}/OneLLM.egg-info/dependency_links.txt +0 -0
  13. {onellm-0.1.0 → onellm-0.1.1}/OneLLM.egg-info/top_level.txt +0 -0
  14. {onellm-0.1.0 → onellm-0.1.1}/onellm/__init__.py +0 -0
  15. {onellm-0.1.0 → onellm-0.1.1}/onellm/audio.py +0 -0
  16. {onellm-0.1.0 → onellm-0.1.1}/onellm/chat_completion.py +0 -0
  17. {onellm-0.1.0 → onellm-0.1.1}/onellm/cli/__init__.py +0 -0
  18. {onellm-0.1.0 → onellm-0.1.1}/onellm/cli/download_model.py +0 -0
  19. {onellm-0.1.0 → onellm-0.1.1}/onellm/client.py +0 -0
  20. {onellm-0.1.0 → onellm-0.1.1}/onellm/completion.py +0 -0
  21. {onellm-0.1.0 → onellm-0.1.1}/onellm/embedding.py +0 -0
  22. {onellm-0.1.0 → onellm-0.1.1}/onellm/errors.py +0 -0
  23. {onellm-0.1.0 → onellm-0.1.1}/onellm/files.py +0 -0
  24. {onellm-0.1.0 → onellm-0.1.1}/onellm/image.py +0 -0
  25. {onellm-0.1.0 → onellm-0.1.1}/onellm/models.py +0 -0
  26. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/anthropic.py +0 -0
  27. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/anyscale.py +0 -0
  28. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/azure.py +0 -0
  29. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/base.py +0 -0
  30. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/bedrock.py +0 -0
  31. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/cohere.py +0 -0
  32. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/deepseek.py +0 -0
  33. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/fallback.py +0 -0
  34. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/fireworks.py +0 -0
  35. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/google.py +0 -0
  36. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/groq.py +0 -0
  37. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/llama_cpp.py +0 -0
  38. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/mistral.py +0 -0
  39. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/ollama.py +0 -0
  40. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/openai.py +0 -0
  41. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/openai_compatible.py +0 -0
  42. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/openrouter.py +0 -0
  43. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/perplexity.py +0 -0
  44. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/together.py +0 -0
  45. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/vertexai.py +0 -0
  46. {onellm-0.1.0 → onellm-0.1.1}/onellm/providers/xai.py +0 -0
  47. {onellm-0.1.0 → onellm-0.1.1}/onellm/speech.py +0 -0
  48. {onellm-0.1.0 → onellm-0.1.1}/onellm/types/__init__.py +0 -0
  49. {onellm-0.1.0 → onellm-0.1.1}/onellm/types/common.py +0 -0
  50. {onellm-0.1.0 → onellm-0.1.1}/onellm/utils/__init__.py +0 -0
  51. {onellm-0.1.0 → onellm-0.1.1}/onellm/utils/fallback.py +0 -0
  52. {onellm-0.1.0 → onellm-0.1.1}/onellm/utils/retry.py +0 -0
  53. {onellm-0.1.0 → onellm-0.1.1}/onellm/utils/streaming.py +0 -0
  54. {onellm-0.1.0 → onellm-0.1.1}/onellm/utils/text_cleaner.py +0 -0
  55. {onellm-0.1.0 → onellm-0.1.1}/onellm/utils/token_counter.py +0 -0
  56. {onellm-0.1.0 → onellm-0.1.1}/onellm/validators.py +0 -0
  57. {onellm-0.1.0 → onellm-0.1.1}/pyproject.toml +0 -0
  58. {onellm-0.1.0 → onellm-0.1.1}/setup.cfg +0 -0
  59. {onellm-0.1.0 → onellm-0.1.1}/setup.py +0 -0
  60. {onellm-0.1.0 → onellm-0.1.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onellm
3
- Version: 0.1.0
3
+ Version: 0.1.1
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
@@ -62,7 +62,7 @@ Dynamic: requires-python
62
62
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
63
63
  [![Test Coverage](https://img.shields.io/badge/coverage-96%25-brightgreen)](https://github.com/muxi-ai/onellm)
64
64
   
65
- [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](./CONTRIBUTING.md)
65
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/muxi-ai/onellm)
66
66
 
67
67
  ### A "drop-in" replacement for OpenAI's client that offers a unified interface for interacting with large language models from various providers, with support for hundreds of models, built-in fallback mechanisms, and enhanced reliability features.
68
68
 
@@ -104,10 +104,10 @@ Dynamic: requires-python
104
104
 
105
105
  The library follows the OpenAI client API design pattern, making it familiar to developers already using OpenAI and enabling easy migration for existing applications. **Simply change your import statements and instantly gain access to hundreds of models** across dozens of providers while maintaining your existing code structure.
106
106
 
107
- With support for 18 implemented providers (and more planned), OneLLM gives you access to approximately 300+ unique language models through a single, consistent interface - from the latest proprietary models to open-source alternatives, all accessible through familiar OpenAI-compatible patterns.
107
+ With support for 19 implemented providers (and more planned), OneLLM gives you access to approximately 300+ unique language models through a single, consistent interface - from the latest proprietary models to open-source alternatives, all accessible through familiar OpenAI-compatible patterns.
108
108
 
109
109
  > [!NOTE]
110
- > **Ready for Use**: OneLLM now supports 18 providers with 300+ models! From cloud APIs to local models, you can access them all through a single, unified interface. [Contributions are welcome](./CONTRIBUTING.md) to help add even more providers!
110
+ > **Ready for Use**: OneLLM now supports 19 providers with 300+ models! From cloud APIs to local models, you can access them all through a single, unified interface. [Contributions are welcome](./CONTRIBUTING.md) to help add even more providers!
111
111
 
112
112
  ---
113
113
 
@@ -163,7 +163,7 @@ For more detailed examples, check out the [examples directory](./examples).
163
163
  | Feature | Description |
164
164
  |---------|-------------|
165
165
  | **📦 Drop-in replacement** | Use your existing OpenAI code with minimal changes |
166
- | **🔄 Provider-agnostic** | Support for 300+ models across 18 implemented providers |
166
+ | **🔄 Provider-agnostic** | Support for 300+ models across 19 implemented providers |
167
167
  | **🔁 Automatic fallback** | Seamlessly switch to alternative models when needed |
168
168
  | **🔄 Auto-retry mechanism** | Retry the same model multiple times before failing |
169
169
  | **🧩 OpenAI-compatible** | Familiar interface for developers used to OpenAI |
@@ -180,9 +180,9 @@ For more detailed examples, check out the [examples directory](./examples).
180
180
 
181
181
  ## 🌐 Supported Providers
182
182
 
183
- OneLLM currently supports **18 providers** with more on the way:
183
+ OneLLM currently supports **19 providers** with more on the way:
184
184
 
185
- ### Cloud API Providers (16)
185
+ ### Cloud API Providers (17)
186
186
  - **Anthropic** - Claude family of models
187
187
  - **Anyscale** - Configurable AI platform
188
188
  - **AWS Bedrock** - Access to multiple model families
@@ -190,6 +190,7 @@ OneLLM currently supports **18 providers** with more on the way:
190
190
  - **Cohere** - Command models with RAG
191
191
  - **DeepSeek** - Chinese LLM provider
192
192
  - **Fireworks** - Fast inference platform
193
+ - **Moonshot** - Kimi models with long-context capabilities
193
194
  - **Google AI Studio** - Gemini models via API key
194
195
  - **Groq** - Ultra-fast inference for Llama, Mixtral
195
196
  - **Mistral** - Mistral Large, Medium, Small
@@ -37,6 +37,7 @@ onellm/providers/google.py
37
37
  onellm/providers/groq.py
38
38
  onellm/providers/llama_cpp.py
39
39
  onellm/providers/mistral.py
40
+ onellm/providers/moonshot.py
40
41
  onellm/providers/ollama.py
41
42
  onellm/providers/openai.py
42
43
  onellm/providers/openai_compatible.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onellm
3
- Version: 0.1.0
3
+ Version: 0.1.1
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
@@ -62,7 +62,7 @@ Dynamic: requires-python
62
62
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
63
63
  [![Test Coverage](https://img.shields.io/badge/coverage-96%25-brightgreen)](https://github.com/muxi-ai/onellm)
64
64
   
65
- [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](./CONTRIBUTING.md)
65
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/muxi-ai/onellm)
66
66
 
67
67
  ### A "drop-in" replacement for OpenAI's client that offers a unified interface for interacting with large language models from various providers, with support for hundreds of models, built-in fallback mechanisms, and enhanced reliability features.
68
68
 
@@ -104,10 +104,10 @@ Dynamic: requires-python
104
104
 
105
105
  The library follows the OpenAI client API design pattern, making it familiar to developers already using OpenAI and enabling easy migration for existing applications. **Simply change your import statements and instantly gain access to hundreds of models** across dozens of providers while maintaining your existing code structure.
106
106
 
107
- With support for 18 implemented providers (and more planned), OneLLM gives you access to approximately 300+ unique language models through a single, consistent interface - from the latest proprietary models to open-source alternatives, all accessible through familiar OpenAI-compatible patterns.
107
+ With support for 19 implemented providers (and more planned), OneLLM gives you access to approximately 300+ unique language models through a single, consistent interface - from the latest proprietary models to open-source alternatives, all accessible through familiar OpenAI-compatible patterns.
108
108
 
109
109
  > [!NOTE]
110
- > **Ready for Use**: OneLLM now supports 18 providers with 300+ models! From cloud APIs to local models, you can access them all through a single, unified interface. [Contributions are welcome](./CONTRIBUTING.md) to help add even more providers!
110
+ > **Ready for Use**: OneLLM now supports 19 providers with 300+ models! From cloud APIs to local models, you can access them all through a single, unified interface. [Contributions are welcome](./CONTRIBUTING.md) to help add even more providers!
111
111
 
112
112
  ---
113
113
 
@@ -163,7 +163,7 @@ For more detailed examples, check out the [examples directory](./examples).
163
163
  | Feature | Description |
164
164
  |---------|-------------|
165
165
  | **📦 Drop-in replacement** | Use your existing OpenAI code with minimal changes |
166
- | **🔄 Provider-agnostic** | Support for 300+ models across 18 implemented providers |
166
+ | **🔄 Provider-agnostic** | Support for 300+ models across 19 implemented providers |
167
167
  | **🔁 Automatic fallback** | Seamlessly switch to alternative models when needed |
168
168
  | **🔄 Auto-retry mechanism** | Retry the same model multiple times before failing |
169
169
  | **🧩 OpenAI-compatible** | Familiar interface for developers used to OpenAI |
@@ -180,9 +180,9 @@ For more detailed examples, check out the [examples directory](./examples).
180
180
 
181
181
  ## 🌐 Supported Providers
182
182
 
183
- OneLLM currently supports **18 providers** with more on the way:
183
+ OneLLM currently supports **19 providers** with more on the way:
184
184
 
185
- ### Cloud API Providers (16)
185
+ ### Cloud API Providers (17)
186
186
  - **Anthropic** - Claude family of models
187
187
  - **Anyscale** - Configurable AI platform
188
188
  - **AWS Bedrock** - Access to multiple model families
@@ -190,6 +190,7 @@ OneLLM currently supports **18 providers** with more on the way:
190
190
  - **Cohere** - Command models with RAG
191
191
  - **DeepSeek** - Chinese LLM provider
192
192
  - **Fireworks** - Fast inference platform
193
+ - **Moonshot** - Kimi models with long-context capabilities
193
194
  - **Google AI Studio** - Gemini models via API key
194
195
  - **Groq** - Ultra-fast inference for Llama, Mixtral
195
196
  - **Mistral** - Mistral Large, Medium, Small
@@ -6,7 +6,7 @@
6
6
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7
7
  [![Test Coverage](https://img.shields.io/badge/coverage-96%25-brightgreen)](https://github.com/muxi-ai/onellm)
8
8
   
9
- [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](./CONTRIBUTING.md)
9
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/muxi-ai/onellm)
10
10
 
11
11
  ### A "drop-in" replacement for OpenAI's client that offers a unified interface for interacting with large language models from various providers, with support for hundreds of models, built-in fallback mechanisms, and enhanced reliability features.
12
12
 
@@ -48,10 +48,10 @@
48
48
 
49
49
  The library follows the OpenAI client API design pattern, making it familiar to developers already using OpenAI and enabling easy migration for existing applications. **Simply change your import statements and instantly gain access to hundreds of models** across dozens of providers while maintaining your existing code structure.
50
50
 
51
- With support for 18 implemented providers (and more planned), OneLLM gives you access to approximately 300+ unique language models through a single, consistent interface - from the latest proprietary models to open-source alternatives, all accessible through familiar OpenAI-compatible patterns.
51
+ With support for 19 implemented providers (and more planned), OneLLM gives you access to approximately 300+ unique language models through a single, consistent interface - from the latest proprietary models to open-source alternatives, all accessible through familiar OpenAI-compatible patterns.
52
52
 
53
53
  > [!NOTE]
54
- > **Ready for Use**: OneLLM now supports 18 providers with 300+ models! From cloud APIs to local models, you can access them all through a single, unified interface. [Contributions are welcome](./CONTRIBUTING.md) to help add even more providers!
54
+ > **Ready for Use**: OneLLM now supports 19 providers with 300+ models! From cloud APIs to local models, you can access them all through a single, unified interface. [Contributions are welcome](./CONTRIBUTING.md) to help add even more providers!
55
55
 
56
56
  ---
57
57
 
@@ -107,7 +107,7 @@ For more detailed examples, check out the [examples directory](./examples).
107
107
  | Feature | Description |
108
108
  |---------|-------------|
109
109
  | **📦 Drop-in replacement** | Use your existing OpenAI code with minimal changes |
110
- | **🔄 Provider-agnostic** | Support for 300+ models across 18 implemented providers |
110
+ | **🔄 Provider-agnostic** | Support for 300+ models across 19 implemented providers |
111
111
  | **🔁 Automatic fallback** | Seamlessly switch to alternative models when needed |
112
112
  | **🔄 Auto-retry mechanism** | Retry the same model multiple times before failing |
113
113
  | **🧩 OpenAI-compatible** | Familiar interface for developers used to OpenAI |
@@ -124,9 +124,9 @@ For more detailed examples, check out the [examples directory](./examples).
124
124
 
125
125
  ## 🌐 Supported Providers
126
126
 
127
- OneLLM currently supports **18 providers** with more on the way:
127
+ OneLLM currently supports **19 providers** with more on the way:
128
128
 
129
- ### Cloud API Providers (16)
129
+ ### Cloud API Providers (17)
130
130
  - **Anthropic** - Claude family of models
131
131
  - **Anyscale** - Configurable AI platform
132
132
  - **AWS Bedrock** - Access to multiple model families
@@ -134,6 +134,7 @@ OneLLM currently supports **18 providers** with more on the way:
134
134
  - **Cohere** - Command models with RAG
135
135
  - **DeepSeek** - Chinese LLM provider
136
136
  - **Fireworks** - Fast inference platform
137
+ - **Moonshot** - Kimi models with long-context capabilities
137
138
  - **Google AI Studio** - Gemini models via API key
138
139
  - **Groq** - Ultra-fast inference for Llama, Mixtral
139
140
  - **Mistral** - Mistral Large, Medium, Small
@@ -0,0 +1 @@
1
+ 0.1.1
@@ -93,6 +93,12 @@ DEFAULT_CONFIG = {
93
93
  "timeout": 30,
94
94
  "max_retries": 3,
95
95
  },
96
+ "moonshot": {
97
+ "api_key": None,
98
+ "api_base": "https://api.moonshot.ai/v1",
99
+ "timeout": 30,
100
+ "max_retries": 3,
101
+ },
96
102
  "google": {
97
103
  "api_key": None,
98
104
  "api_base": "https://generativelanguage.googleapis.com/v1beta",
@@ -169,6 +175,7 @@ PROVIDER_API_KEY_ENV_MAP = {
169
175
  "fireworks": "FIREWORKS_API_KEY",
170
176
  "perplexity": "PERPLEXITY_API_KEY",
171
177
  "deepseek": "DEEPSEEK_API_KEY",
178
+ "moonshot": "MOONSHOT_API_KEY",
172
179
  "google": "GOOGLE_API_KEY",
173
180
  "cohere": "COHERE_API_KEY",
174
181
  "anyscale": "ANYSCALE_API_KEY",
@@ -44,6 +44,7 @@ from .together import TogetherProvider
44
44
  from .fireworks import FireworksProvider
45
45
  from .perplexity import PerplexityProvider
46
46
  from .deepseek import DeepSeekProvider
47
+ from .moonshot import MoonshotProvider
47
48
  from .google import GoogleProvider
48
49
  from .azure import AzureProvider
49
50
  from .anyscale import AnyscaleProvider
@@ -75,6 +76,7 @@ register_provider("together", TogetherProvider)
75
76
  register_provider("fireworks", FireworksProvider)
76
77
  register_provider("perplexity", PerplexityProvider)
77
78
  register_provider("deepseek", DeepSeekProvider)
79
+ register_provider("moonshot", MoonshotProvider)
78
80
  register_provider("google", GoogleProvider)
79
81
  register_provider("azure", AzureProvider)
80
82
  register_provider("anyscale", AnyscaleProvider)
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env python3
2
+ #
3
+ # Unified interface for LLM providers using OpenAI format
4
+ # https://github.com/muxi-ai/onellm
5
+ #
6
+ # Copyright (C) 2025 Ran Aroussi
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License");
9
+ # you may not use this file except in compliance with the License.
10
+ # You may obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS,
16
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ # See the License for the specific language governing permissions and
18
+ # limitations under the License.
19
+
20
+
21
+ """
22
+ Moonshot provider implementation for OneLLM.
23
+
24
+ Moonshot AI is a Chinese AI company providing the Kimi large language model series
25
+ with OpenAI-compatible APIs, known for their long-context capabilities and strong
26
+ performance on coding and reasoning tasks.
27
+ """
28
+
29
+ from .base import register_provider
30
+ from .openai_compatible import OpenAICompatibleProvider
31
+
32
+
33
+ class MoonshotProvider(OpenAICompatibleProvider):
34
+ """Moonshot provider implementation."""
35
+
36
+ # Provider configuration
37
+ provider_name = "moonshot"
38
+ default_api_base = "https://api.moonshot.ai/v1"
39
+
40
+ # Set capability flags
41
+ json_mode_support = True
42
+
43
+ # Multi-modal capabilities
44
+ vision_support = True # Kimi-VL supports vision
45
+ audio_input_support = True # Kimi-Audio supports audio
46
+ video_input_support = False # No video support currently
47
+
48
+ # Streaming capabilities
49
+ streaming_support = True # All models support streaming
50
+ token_by_token_support = True # Provides token-by-token streaming
51
+
52
+ # Realtime capabilities
53
+ realtime_support = False # No realtime API
54
+
55
+ # Additional capabilities
56
+ function_calling_support = True # Supports function calling
57
+
58
+
59
+ # Register the Moonshot provider
60
+ register_provider("moonshot", MoonshotProvider)
@@ -1 +0,0 @@
1
- 0.1.0
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