Skip to content

Add multi-LLM support and update dependencies in README and agent.py#10

Open
Oncorporation wants to merge 1 commit into
kevinrgu:mainfrom
Oncorporation:main
Open

Add multi-LLM support and update dependencies in README and agent.py#10
Oncorporation wants to merge 1 commit into
kevinrgu:mainfrom
Oncorporation:main

Conversation

@Oncorporation
Copy link
Copy Markdown

There is no reason to limit ourselves to one token provider. Here we can use local Ollama and other providers

Copilot AI review requested due to automatic review settings May 3, 2026 17:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds configurable multi-provider model selection to the Harbor agent harness and documents how to switch providers via environment variables, alongside adding LiteLLM as a dependency.

Changes:

  • Add litellm>=1.60.0 to project dependencies.
  • Update agent.py to derive provider/model from environment variables and build a provider-specific model identifier.
  • Document multi-LLM configuration examples in README.md (OpenAI, Anthropic, Ollama, Azure).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
pyproject.toml Adds LiteLLM dependency to support multi-provider routing.
agent.py Adds env-driven provider/model configuration and constructs a provider-qualified model string for the Agent.
README.md Documents environment variables and example configs for multiple providers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agent.py
Comment on lines +29 to +30
MAX_TURNS = 15

Comment thread agent.py
Comment on lines +68 to +71
if LLM_PROVIDER == "ollama":
# Ollama uses custom base URL format
model_string = f"ollama_chat/{MODEL}" if not LLM_BASE_URL else f"ollama_chat/{MODEL}"
elif LLM_PROVIDER == "azure":
Comment thread agent.py
Comment on lines 80 to 85
return Agent(
name="autoagent",
instructions=SYSTEM_PROMPT,
tools=tools,
model=MODEL,
model=model_string,
)
Comment thread README.md
- `LLM_PROVIDER`: Provider name (`openai`, `anthropic`, `ollama`, `azure`, etc.)
- `MODEL`: Model name (e.g., `gpt-5`, `claude-3-5-sonnet`, `qwen3.5:35b-a3b-q8_0`)
- `LLM_BASE_URL`: Optional base URL (required for Ollama, Azure, etc.)
- `API_KEY`: Provider-specific API key (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`)
Comment thread README.md
LLM_PROVIDER=azure
MODEL=your-deployment-name
AZURE_API_KEY=your-api-key
AZURE_API_BASE=https://your-resource.openai.azure.com
Comment thread pyproject.toml
"openpyxl",
"numpy",
"harbor",
"litellm>=1.60.0",
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