-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why re-invent the wheel? #113
Comments
You bring up a good point—tools like Litellm and others are already out there and do a great job. But honestly, history is full of success stories that started with someone "reinventing the wheel." Python, for example, came along when we already had C, Perl, and Java, yet it succeeded because it focused on simplicity and readability. It wasn’t just about what it did, but how it did it. The thing is, progress doesn’t always come from doing something completely new. Sometimes it’s about taking an existing idea and iterating on it—making it a little better, a little different, or just more aligned with a specific need. And often, the act of building itself leads to a deeper understanding of the problem space and opens doors to innovation. Sure, Litellm and others are great, but there’s always room for someone to come in with fresh eyes and create something unexpected. Supporting that kind of work isn’t just about the outcome—it’s about fostering curiosity, creativity, and growth. Even if the result isn’t a revolution, the process itself is invaluable. Who knows? Maybe this iteration will be the one that sparks something big. |
Plus, these tools themselves are also reinventing the wheel in a way. Litellm and others often act as wrappers around powerful tools like OpenAI, Mistral, and others. But think about it—weren’t these tools also reinventing the wheel when OpenAI first made its mark? OpenAI wasn’t the first AI company, and tools like Mistral built on those foundations, refining the approach, targeting specific needs, and pushing boundaries. Reinvention is just part of how progress works. |
Looking into LiteLLM's source makes me reinvent the wheel |
Cool reply. Tools only become the tools since they apply specifically. |
Yeah I mean that's the real question, why is this wheel different?
…On Sat, Nov 30, 2024, 8:11 AM MartinGuo ***@***.***> wrote:
makes
Cool reply. Tools only become the tools since they apply specifically.
Are there any highlights on this project regarding the comparison?
—
Reply to this email directly, view it on GitHub
<#113 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADU2N5XAF4NDW5GULTDNDUT2DHIRPAVCNFSM6AAAAABSYHC5CGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBYHE4TKMBWGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi @TashaSkyUp, I am not contributor here or in any of the existing libraries, but I am currently checking the available solutions to easily query different LLM providers. Also I like to look into other people codebase, and judge it, so I can give you some elements of response from the point of view of a python package developer. First my use-case: all I want is a python API for sending messages to LLM providers and getting a completion back
|
Thank you for the thoughtful analysis. I agree litellm is no longer lite. But I imagine it was at some point. Also Ive already seen in this repository that there are plans to start expanding the codebase to cover more features. I imagine this is exactly how litellm started out. "oh we will keep it lite, clean and simple!" Just like this repo is now. Your other comments around industry standards / what people should do are your opinion / possibly rules you dictate to your subordinates. This my friend is the wilds of github.. people from all nations, socio-economic status, education levels, (dis)abilities and a thousand other different qualifiers contribute here. If the repo owners want to be inclusive that not everyone is a CS major with 10 years in industry (lucky bastards). Then great, if not.. maybe they should host it on their own git. |
A lot of these But it would be just good to hear from the authors as to what the intent and direction of this repo is, as it would give some insights as to where to contribute. |
@andrewyng Loved your classes! And I would love to hear your thoughts or your teams thoughts on this thread! What do you think? How will aisuite differentiate itself from the others? |
Addresses code qa critique andrewyng/aisuite#113 (comment)
* feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class --------- Co-authored-by: Krrish Dholakia <[email protected]>
* feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class * feat(cohere-+-clarifai): refactor integrations to use common base config class * fix: fix linting errors * refactor(anthropic/): move anthropic + vertex anthropic to use base config * test: fix xai test * test: fix tests * fix: fix linting errors * test: comment out WIP test * fix(transformation.py): fix is pdf used check * fix: fix linting error
…ere (#7117) * fix use new format for Cohere config * fix base llm http handler * Litellm code qa common config (#7116) * feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class --------- Co-authored-by: Krrish Dholakia <[email protected]> * use base transform helpers * use base_llm_http_handler for cohere * working cohere using base llm handler * add async cohere chat completion support on base handler * fix completion code * working sync cohere stream * add async support cohere_chat * fix types get_model_response_iterator * async / sync tests cohere * feat cohere using base llm class * fix linting errors * fix _abc error * add cohere params to transformation * remove old cohere file * fix type error * fix merge conflicts * fix cohere merge conflicts * fix linting error * fix litellm.llms.custom_httpx.http_handler.HTTPHandler.post * fix passing cohere specific params --------- Co-authored-by: Krrish Dholakia <[email protected]>
…y, mistral, codestral, nvidia nim, cerebras, volcengine, text completion codestral, sambanova, maritalk to base llm config Addresses feedback from andrewyng/aisuite#113 (comment)
* feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class * feat(cohere-+-clarifai): refactor integrations to use common base config class * fix: fix linting errors * refactor(anthropic/): move anthropic + vertex anthropic to use base config * test: fix xai test * test: fix tests * fix: fix linting errors * test: comment out WIP test * fix(transformation.py): fix is pdf used check * fix: fix linting error
…ere (#7117) * fix use new format for Cohere config * fix base llm http handler * Litellm code qa common config (#7116) * feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class --------- Co-authored-by: Krrish Dholakia <[email protected]> * use base transform helpers * use base_llm_http_handler for cohere * working cohere using base llm handler * add async cohere chat completion support on base handler * fix completion code * working sync cohere stream * add async support cohere_chat * fix types get_model_response_iterator * async / sync tests cohere * feat cohere using base llm class * fix linting errors * fix _abc error * add cohere params to transformation * remove old cohere file * fix type error * fix merge conflicts * fix cohere merge conflicts * fix linting error * fix litellm.llms.custom_httpx.http_handler.HTTPHandler.post * fix passing cohere specific params --------- Co-authored-by: Krrish Dholakia <[email protected]>
* feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class * feat(cohere-+-clarifai): refactor integrations to use common base config class * fix: fix linting errors * refactor(anthropic/): move anthropic + vertex anthropic to use base config * test: fix xai test * test: fix tests * fix: fix linting errors * test: comment out WIP test * fix(transformation.py): fix is pdf used check * fix: fix linting error
…ere (#7117) * fix use new format for Cohere config * fix base llm http handler * Litellm code qa common config (#7116) * feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class --------- Co-authored-by: Krrish Dholakia <[email protected]> * use base transform helpers * use base_llm_http_handler for cohere * working cohere using base llm handler * add async cohere chat completion support on base handler * fix completion code * working sync cohere stream * add async support cohere_chat * fix types get_model_response_iterator * async / sync tests cohere * feat cohere using base llm class * fix linting errors * fix _abc error * add cohere params to transformation * remove old cohere file * fix type error * fix merge conflicts * fix cohere merge conflicts * fix linting error * fix litellm.llms.custom_httpx.http_handler.HTTPHandler.post * fix passing cohere specific params --------- Co-authored-by: Krrish Dholakia <[email protected]>
…oth use base llm config Addresses andrewyng/aisuite#113 (comment)
commit 7fb0ca9 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 18:00:11 2024 -0800 fix(hf/transformation.py): fix env var pickup commit 72efdfb Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 17:16:31 2024 -0800 test: mark flaky test commit 8517bec Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 16:10:01 2024 -0800 test: skip local test commit 9105aa3 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 15:48:10 2024 -0800 test: cleanup test commit 267e1d7 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 15:47:31 2024 -0800 ci: test faster ci/cd commit 4f08775 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 15:35:42 2024 -0800 ci(config.yml): speed up ci/cd commit c6a582a Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 15:34:13 2024 -0800 test: fix palm tests commit d9adb85 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 15:09:28 2024 -0800 test: fix hf test commit 6489e14 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 14:49:51 2024 -0800 fix: test commit 39c49b8 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 14:19:59 2024 -0800 fix(huggingface/handler.py): handle rate limit errors correctly commit ebda638 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 14:17:42 2024 -0800 fix(openai.py): fix transform messages check commit 34c6dd8 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 14:12:07 2024 -0800 test: fix test commit 5099554 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 13:51:21 2024 -0800 fix(utils.py): add anthropic text mapping commit c296071 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 13:50:41 2024 -0800 fix: map cloudflare config commit 8f86154 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 13:42:21 2024 -0800 fix: fix linting errors commit 7bca018 Author: Ishaan Jaff <[email protected]> Date: Tue Dec 10 12:23:58 2024 -0800 (Refactor) Code Quality improvement - Use Common base handler for `anthropic_text/` (#7143) * add anthropic text provider * add ANTHROPIC_TEXT to LlmProviders * fix anthropic text implementation * working anthropic text claude-2 * test_acompletion_claude2_stream * add param mapping for anthropic text * fix unused imports * fix anthropic completion handler.py commit 60978f3 Author: Ishaan Jaff <[email protected]> Date: Tue Dec 10 10:44:42 2024 -0800 (Refactor) Code Quality improvement - Use Common base handler for Cohere /generate API (#7122) * use validate_environment in common utils * use transform request / response for cohere * remove unused file * use cohere base_llm_http_handler * working cohere generate api on llm http handler * streaming cohere generate api * fix get_model_response_iterator * fix streaming handler * fix get_model_response_iterator * test_cohere_generate_api_completion * fix linting error * fix testing cohere raising error * fix get_model_response_iterator type * add testing cohere generate api commit 4432055 Author: Ishaan Jaff <[email protected]> Date: Tue Dec 10 10:12:22 2024 -0800 (Refactor) Code Quality improvement - Use Common base handler for `cloudflare/` provider (#7127) * add get_complete_url to base config * cloudflare - refactor to following existing pattern * migrate cloudflare chat completions to base llm http handler * fix unused import * fix fake stream in cloudflare * fix cloudflare transformation * fix naming for BaseModelResponseIterator * add async cloudflare streaming test * test cloudflare * add handler.py * add handler.py in cohere handler.py commit a2c129c Author: Ishaan Jaff <[email protected]> Date: Mon Dec 9 21:04:48 2024 -0800 (Refactor) Code Quality improvement - Use Common base handler for `clarifai/` (#7125) * use base_llm_http_handler for clarifai * fix clarifai completion * handle faking streaming base llm http handler * add fake streaming for clarifai * add FakeStreamResponseIterator for base model iterator * fix get_model_response_iterator * fix base model iterator * fix base model iterator * add support for faking sync streams clarfiai * add fake streaming for clarifai * remove unused code * fix import * fix llm http handler * test_async_completion_clarifai * fix clarifai tests * fix linting commit e4f83cd Author: Ishaan Jaff <[email protected]> Date: Mon Dec 9 17:45:29 2024 -0800 (Refactor) Code Quality improvement - use Common base handler for Cohere (#7117) * fix use new format for Cohere config * fix base llm http handler * Litellm code qa common config (#7116) * feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class --------- Co-authored-by: Krrish Dholakia <[email protected]> * use base transform helpers * use base_llm_http_handler for cohere * working cohere using base llm handler * add async cohere chat completion support on base handler * fix completion code * working sync cohere stream * add async support cohere_chat * fix types get_model_response_iterator * async / sync tests cohere * feat cohere using base llm class * fix linting errors * fix _abc error * add cohere params to transformation * remove old cohere file * fix type error * fix merge conflicts * fix cohere merge conflicts * fix linting error * fix litellm.llms.custom_httpx.http_handler.HTTPHandler.post * fix passing cohere specific params --------- Co-authored-by: Krrish Dholakia <[email protected]> commit 48b134a Author: Krish Dholakia <[email protected]> Date: Mon Dec 9 15:58:25 2024 -0800 Litellm code qa common config (#7113) * feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class * feat(cohere-+-clarifai): refactor integrations to use common base config class * fix: fix linting errors * refactor(anthropic/): move anthropic + vertex anthropic to use base config * test: fix xai test * test: fix tests * fix: fix linting errors * test: comment out WIP test * fix(transformation.py): fix is pdf used check * fix: fix linting error commit 98902d6 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 13:11:47 2024 -0800 test: cleanup tests commit 681d69b Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 12:13:55 2024 -0800 fix(ai21/transformation.py): add tool choice to ai21 optional params commit 62f5597 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 12:02:38 2024 -0800 fix: fix linting errors commit 484cb2b Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 11:49:58 2024 -0800 fix: fix linting errors commit 49e0c0b Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 11:37:32 2024 -0800 perf: huggingface async streaming perf improvement - reuse client commit 1a2f516 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 11:10:21 2024 -0800 fix: fix linting errors commit a7bd5d6 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 11:09:26 2024 -0800 fix: fix linting error commit b09b85f Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 11:07:24 2024 -0800 fix: fix linting errors commit e4e1a35 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 11:04:02 2024 -0800 fix: fix linting error commit 46d109d Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 11:00:06 2024 -0800 fix: fix linting errors commit 9aa1f26 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 10:42:38 2024 -0800 fix: fix linting error commit ca51fca Author: Ishaan Jaff <[email protected]> Date: Mon Dec 9 21:04:48 2024 -0800 (Refactor) Code Quality improvement - Use Common base handler for `clarifai/` (#7125) * use base_llm_http_handler for clarifai * fix clarifai completion * handle faking streaming base llm http handler * add fake streaming for clarifai * add FakeStreamResponseIterator for base model iterator * fix get_model_response_iterator * fix base model iterator * fix base model iterator * add support for faking sync streams clarfiai * add fake streaming for clarifai * remove unused code * fix import * fix llm http handler * test_async_completion_clarifai * fix clarifai tests * fix linting commit f36e57b Author: Ishaan Jaff <[email protected]> Date: Mon Dec 9 17:45:29 2024 -0800 (Refactor) Code Quality improvement - use Common base handler for Cohere (#7117) * fix use new format for Cohere config * fix base llm http handler * Litellm code qa common config (#7116) * feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class --------- Co-authored-by: Krrish Dholakia <[email protected]> * use base transform helpers * use base_llm_http_handler for cohere * working cohere using base llm handler * add async cohere chat completion support on base handler * fix completion code * working sync cohere stream * add async support cohere_chat * fix types get_model_response_iterator * async / sync tests cohere * feat cohere using base llm class * fix linting errors * fix _abc error * add cohere params to transformation * remove old cohere file * fix type error * fix merge conflicts * fix cohere merge conflicts * fix linting error * fix litellm.llms.custom_httpx.http_handler.HTTPHandler.post * fix passing cohere specific params --------- Co-authored-by: Krrish Dholakia <[email protected]> commit 56a69f3 Author: Krish Dholakia <[email protected]> Date: Mon Dec 9 15:58:25 2024 -0800 Litellm code qa common config (#7113) * feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment) * feat(base_llm/): add transform request/response abstract methods to base config class * feat(cohere-+-clarifai): refactor integrations to use common base config class * fix: fix linting errors * refactor(anthropic/): move anthropic + vertex anthropic to use base config * test: fix xai test * test: fix tests * fix: fix linting errors * test: comment out WIP test * fix(transformation.py): fix is pdf used check * fix: fix linting error commit 12fba38 Author: Krrish Dholakia <[email protected]> Date: Tue Dec 10 00:07:50 2024 -0800 test: comment out WIP test commit b37d2dd Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 22:20:43 2024 -0800 refactor: move nlp cloud, oobabooga, ollamachat, deepinfra, perplexity, mistral, codestral, nvidia nim, cerebras, volcengine, text completion codestral, sambanova, maritalk to base llm config Addresses feedback from andrewyng/aisuite#113 (comment) commit b621e64 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 20:54:21 2024 -0800 refactor(azure/): refactor azure openai to use base llm config commit bd07837 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 20:22:50 2024 -0800 refactor(refactor/): gemini + vertex ai gemini refactor to support base llm config commit 3ac1909 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 18:41:33 2024 -0800 refactor(huggingface/): refactor huggingface to use base llm config class commit 386d7a9 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 17:21:18 2024 -0800 refactor(replicate/): refactor replicate to use base config commit 097bc43 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 13:53:08 2024 -0800 fix: fix linting errors commit ccd2d8d Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 13:49:29 2024 -0800 test: fix tests commit b1d1b34 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 13:47:38 2024 -0800 test: fix xai test commit d1c5462 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 12:52:00 2024 -0800 refactor(anthropic/): move anthropic + vertex anthropic to use base config commit 0333c82 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 12:00:44 2024 -0800 fix: fix linting errors commit 2bbeea6 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 11:48:23 2024 -0800 feat(cohere-+-clarifai): refactor integrations to use common base config class commit de9fc38 Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 10:11:44 2024 -0800 feat(base_llm/): add transform request/response abstract methods to base config class commit 284377e Author: Krrish Dholakia <[email protected]> Date: Mon Dec 9 09:11:12 2024 -0800 feat(base_llm): initial commit for common base config class Addresses code qa critique andrewyng/aisuite#113 (comment)
#7151) * refactor(sagemaker/): separate chat + completion routes + make them both use base llm config Addresses andrewyng/aisuite#113 (comment) * fix(main.py): pass hf model name + custom prompt dict to litellm params
…#7157) * refactor(ollama/): refactor ollama `/api/generate` to use base llm config Addresses andrewyng/aisuite#113 (comment) * test: skip unresponsive test * test(test_secret_manager.py): mark flaky test * test: fix google sm test
* refactor(ollama/): refactor ollama `/api/generate` to use base llm config Addresses andrewyng/aisuite#113 (comment) * test: skip unresponsive test * test(test_secret_manager.py): mark flaky test * test: fix google sm test * fix: fix init.py
Hi @vemonet , thank you for the feedback on litellm. Here’s what we’ve done / are doing about this. Is this what you wanted? 1. ‘LLM providers don't have a unified parent abstract class’All chat providers (exc. Bedrock) now inherit from a parent abstract class For reference, here's the refactor on: 2. 'no clear coherent structure for LLM providers'We refactored Standard naming convention: All folders in llms/ are now named after their litellm provider name. enforced test Common enforced structure: https://github.com/BerriAI/litellm/tree/30e147a315d29ba3efe61a179e80409a77754a42/litellm/llms/watsonx
3. ‘As a bonus they are redefining a LiteLLMBase class many times at different place’Removed redefiniton: Defined in just 1 place Clarity on usage: Renamed it to 4. ‘Another red flag: there is a symlinks to requirements.txt in the main package folder’Removed the symlinks to requirements.txt 5. ‘Configuration for linting tools is a complete mess’LiteLLM follows the Google Python Style Guide. We run:
If there's any way we can improve further here, let me know. [PLANNED FOR NEXT WEEK]1. ‘The list of mandatory dependencies for
|
@TashaSkyUp - Please wait for the next set of features to be announced/added. Differentiators will become evident over the course of next few releases. Thanks for using aisuite and giving feedback. We are committed to maintain and enhance this library long term. |
Is it easy to migrate from Lite LLM to Aisuite or vice versa? |
Litellm and probably a few others have already done all of this.. this energy and time would be better spent on litellm.
I mean I guess there's a couple possible reasons but I don't see them being mentioned so.
The text was updated successfully, but these errors were encountered: