Skip to content

Conversation

@pythonomar22
Copy link
Collaborator

Added LiteLLM support. Tested locally and passes. Have not added support for Sambanova.

Copy link
Collaborator

@simonguozirui simonguozirui left a comment

Choose a reason for hiding this comment

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

Looks great! let's think about a few details re: local serving and default settings, and make sure the E2E pipeline still works. So much cleaner, great work @pythonomar22 and then we can merge it

another thing to do in the future is to leverage the litellm / openai batch call API, but that is for a future PR.

src/utils.py Outdated
return outputs
messages = prompt

if system_prompt and (not messages or messages[0].get("role") != "system"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we put this ahead before building the message list with the prompt

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, updated to check if the prompt already contains a system message before building the messages list.

self.max_tokens = 4096
self.temperature = 0.0
self.server_type = None
self.model_name = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

so are we not specifying a default, this could also works, and just expect them to use a preset here?

Copy link
Collaborator Author

@pythonomar22 pythonomar22 Oct 31, 2025

Choose a reason for hiding this comment

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

updated to reflect slack thread - but yeah

@simonguozirui simonguozirui added the enhancement New feature or request label Nov 4, 2025
@simonguozirui simonguozirui merged commit 4413094 into main Nov 4, 2025
@simonguozirui
Copy link
Collaborator

Thanks for cleaning this up @pythonomar22 and we finally have a clean llm interface rather than the hacky per provider client condition statements that I wrote.

siddagra pushed a commit to siddagra/KernelBench that referenced this pull request Nov 10, 2025
* adding litellm support for all except sambanova

* adding reasoning config support

* addressing some comments

* fixing modal litellm

* setting defaults

* litellm lgtm

---------

Co-authored-by: Omar Abul-Hassan <omarah@matx1.stanford.edu>
Co-authored-by: Simon Guo <simonguo@stanford.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants