Skip to content

Conversation

@MarcCote
Copy link
Collaborator

This pull request adds support for LiteLLM as a new language model backend in the codebase. It introduces a new LiteLLM class that integrates the LiteLLM library, enabling both tool-calling and non-tool-calling modes, and updates the model instantiation logic and imports accordingly.

LiteLLM integration:

  • Added a new implementation LiteLLM in debug_gym/llms/litellm.py, supporting both tool-calling and non-tool-calling modes, with robust error handling, token counting, and response parsing logic.
  • Updated the model instantiation logic in debug_gym/llms/base.py to allow selection of LiteLLM when "litellm" is present in the tags.
  • Included LiteLLM in the __init__.py import and export lists for the llms module. [1] [2]

Agent improvements:

  • Added a new SimpleAgent class in debug_gym/agents/simple_agent.py that parses tool calls from LLM responses using a custom XML-like format, executes them, and manages agent-environment interaction and logging.

@MarcCote MarcCote requested a review from sordonia December 12, 2025 18:53
@MarcCote MarcCote force-pushed the agent_without_tool_calling branch from 25c5c1d to 9624fdc Compare December 13, 2025 01:51
@MarcCote MarcCote changed the title Adding simple agent and litellm support Adding simple agent and option to call llm with tools Dec 13, 2025
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