Skip to content

Add open-source / self-hosted model support#8

Open
mattmorr1 wants to merge 2 commits into
mainfrom
opensource
Open

Add open-source / self-hosted model support#8
mattmorr1 wants to merge 2 commits into
mainfrom
opensource

Conversation

@mattmorr1

Copy link
Copy Markdown
  • New OpenSourceAdapter for OpenAI-compatible endpoints (vLLM/TGI/Ollama/ llama.cpp), self-configured via OPEN_SOURCE_* env vars and registered as the open_source provider.
  • config + pricing entries for the tested models: Foundation-Sec-8B-Reasoning, Seneca-QwQ-32B, and GLM-5.2.

Comment thread src/socbench/providers/open_source_adapter.py Fixed
parsed = json.loads(text)
if isinstance(parsed, dict):
return parsed
except (json.JSONDecodeError, TypeError):

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new open_source provider to support self-hosted / open-weight models exposed via OpenAI-compatible Chat Completions endpoints (vLLM/TGI/Ollama/llama.cpp), plus associated configuration and pricing entries.

Changes:

  • Introduces OpenSourceAdapter with env-driven HTTP configuration and a content-fallback parser for tool calls / final submissions embedded in text.
  • Registers open_source as a first-class provider and updates config typing to include it.
  • Adds benchmark + pricing config for several tested open models and introduces unit tests for the fallback parsing behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_providers_open_source.py Adds unit tests for content-fallback parsing of tool calls and submit_assessment payload recovery.
src/socbench/providers/open_source_adapter.py Implements OpenAI-compatible Chat Completions adapter + parsing/fallback logic for open-source/self-hosted endpoints.
src/socbench/providers/base.py Registers the open_source provider in the adapter factory and known-provider listing.
src/socbench/config.py Extends ProviderName typing to include open_source.
config/pricing.yaml Adds pricing entries under open_source for self-hosted cost attribution.
config/benchmark_config.yaml Adds an open_source provider stanza with defaults and documentation.

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

Comment thread src/socbench/providers/open_source_adapter.py Outdated
- New OpenSourceAdapter for OpenAI-compatible endpoints (vLLM/TGI/Ollama/
  llama.cpp), self-configured via OPEN_SOURCE_* env vars and registered as the
  `open_source` provider.
- config + pricing entries for the tested models: Foundation-Sec-8B-Reasoning,
  Seneca-QwQ-32B, and GLM-5.2.

No changes to the agent loop, scoring, prompts, tools, or the hosted-provider
adapters — frontier-model benchmark results are unaffected.
Comment thread src/socbench/providers/open_source_adapter.py Dismissed
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