Skip to content

feat: Add OpenAI-compatible backend for local model support#2

Merged
weijt606 merged 4 commits into
mainfrom
v0.1.2
Apr 8, 2026
Merged

feat: Add OpenAI-compatible backend for local model support#2
weijt606 merged 4 commits into
mainfrom
v0.1.2

Conversation

@weijt606

@weijt606 weijt606 commented Apr 8, 2026

Copy link
Copy Markdown
Owner

feat: Add OpenAI-compatible backend for local model support

Summary / 概述

Add a new openai proposer backend that enables PolyHarness to work with any OpenAI-compatible API endpoint — including locally deployed models via Ollama, vLLM, LM Studio, and similar tools.

新增 openai 后端,支持通过 OpenAI 兼容接口连接本地部署模型(Ollama、vLLM、LM Studio 等),让用户无需云端 API 即可使用 PolyHarness 进行 harness 优化。

Changes / 变更内容

  • New file: openai_proposer.py — OpenAI-compatible proposer with full tool loop (file_read, file_write, list_dir, bash)
  • Config: Added base_url and api_key fields to ProposerConfig for custom endpoint configuration
  • CLI: Added openai to --agent and --backend choices in ph init / ph run
  • Dependency: Added openai>=1.0.0 to pyproject.toml
  • Docs: Updated README.md and README_CN.md backend tables
  • Version: Bumped to 0.1.2

Usage / 使用方式

ph init --agent openai
ph config set proposer.model llama3.3
ph config set proposer.base_url http://localhost:11434/v1
ph run

Testing / 测试

  • 121 tests passed
  • ruff lint clean

weijt606 added 4 commits April 8, 2026 16:53
…udio)

- New OpenAIProposer with tool loop via OpenAI-compatible API
- Config: added base_url and api_key fields to ProposerConfig
- CLI: added 'openai' to --agent and --backend choices
- Dependency: added openai>=1.0.0
- Docs: updated README.md and README_CN.md with openai backend row
@weijt606
weijt606 merged commit 24201d8 into main Apr 8, 2026
4 of 5 checks passed
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