Skip to content

Register litellm provider#60

Open
AlbertDeFusco wants to merge 7 commits into
mainfrom
litellm-autorun
Open

Register litellm provider#60
AlbertDeFusco wants to merge 7 commits into
mainfrom
litellm-autorun

Conversation

@AlbertDeFusco
Copy link
Copy Markdown
Collaborator

@AlbertDeFusco AlbertDeFusco commented Oct 24, 2025

Here we make use of a pth file to have the litellm provider registered on load rather than require the use to perform an import statement. This is still a stop-gap until BerriAI/litellm#7733 is resolved.

Comment thread src/anaconda_ai.pth
@@ -0,0 +1 @@
import os, sys;exec('try:\n import litellm\n from anaconda_ai.integrations.litellm import AnacondaLLM\n anaconda_llm = AnacondaLLM()\n litellm.custom_provider_map.append(\n {"provider": "anaconda", "custom_handler": anaconda_llm}\n )\nexcept ImportError:\n pass\n')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this as a .pth hook? Might be worth some followup

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This .pth is need until litellm merges my PR (or their own implementation) for entry-point support

BerriAI/litellm#15881

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was easier than I thought. My PR was merged and looks like its going to be released soon. That will make the .pth file unnecessary. Once released I'll revise this PR.

https://github.com/BerriAI/litellm/releases/tag/v1.79.1.dev1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants