Skip to content

feat: Add Forge as LLM provider#65

Open
Yiiii0 wants to merge 1 commit intoPRIME-RL:mainfrom
Yiiii0:feature/forge-20260307-234327
Open

feat: Add Forge as LLM provider#65
Yiiii0 wants to merge 1 commit intoPRIME-RL:mainfrom
Yiiii0:feature/forge-20260307-234327

Conversation

@Yiiii0
Copy link

@Yiiii0 Yiiii0 commented Mar 8, 2026

Summary

Adds Forge API support to LiveCodeBench's OpenAI runner. When FORGE_API_KEY is set, the runner routes requests through Forge's OpenAI-compatible API, with automatic model style detection for chat and reasoning models.

Changes

  • lcb_runner/runner/main.py: Auto-detect OpenAIChat/OpenAIReason model style for Forge models (identified by Provider/model-name format)
  • lcb_runner/runner/oai_runner.py: Conditionally initialize OpenAI client with Forge API credentials when FORGE_API_KEY is set

Usage

# Set environment variables
export FORGE_API_KEY="your-forge-api-key"

# Run with a Forge model (Provider/model-name format)
python -m lcb_runner.runner.main --model "OpenAI/gpt-4o-mini" ...

Test Evidence

All existing tests pass. The change is additive — when FORGE_API_KEY is not set, behavior is identical to upstream.

I work at TensorBlock and will help maintain this integration.


About Forge

Forge is an open-source middleware service for unified AI model provider management. It routes requests across 40+ AI providers with access to thousands of models through a single OpenAI-compatible API.

## Changes

- Automated integration updates from manager loop.

Files modified:
eval/Coding/livecodebench/LiveCodeBench-main/lcb_runner/runner/main.py
eval/Coding/livecodebench/LiveCodeBench-main/lcb_runner/runner/oai_runner.py
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.

1 participant