Skip to content

feat(bench): OpenAI + Gemini tool-use adapters (#107)#122

Merged
Connorrmcd6 merged 1 commit into
feat/102-anthropic-stepfrom
feat/107-openai-gemini-adapters
Jun 14, 2026
Merged

feat(bench): OpenAI + Gemini tool-use adapters (#107)#122
Connorrmcd6 merged 1 commit into
feat/102-anthropic-stepfrom
feat/107-openai-gemini-adapters

Conversation

@Connorrmcd6

Copy link
Copy Markdown
Owner

Summary

Cross-provider adapters for the multi-turn generalization sweep (#107), so "a more capable model is no more rot-resistant" doesn't rest on three Claude models. Code only — live smokes come later (as discussed); exact model ids, pricing, and any per-model param quirks are flagged TODO at smoke time.

⚠️ Stacked on #121 (the Anthropic step() adapter). Base is feat/102-anthropic-step; GitHub will retarget this to main once #121 merges. Review #121 first.

What changed

  • models.pyOpenAIModel.step() (Chat Completions + function tools) and GeminiModel.step() (google-genai generate_content + function calling), each behind the same ToolModel protocol, with lazy SDK imports + key guards mirroring AnthropicModel (so nothing imports the SDKs unless that provider is actually used). Pure, module-level converters for both — including Gemini's function_response name resolution (Gemini keys tool results by function name, not id, so the converter maps id→name from the preceding call). build_model gains openai/gemini via a small provider→class map.
  • config.toml[models.gpt] + [models.gemini] with placeholder ids/pricing.
  • pyproject.toml + uv.lock — a [providers] optional extra (openai, google-genai); not needed for the Anthropic-only or offline paths.
  • tests — 6 offline tests for the converters + response parsing via fake responses. No network in the suite.

Verification

  • uv run pytest (in bench/) — 30 passed (6 new). Converters import and run with the provider SDKs not installed.
  • cargo fmt --all --check — clean (no Rust touched).
  • No live calls yet — first OpenAI/Gemini smokes (and pinning model ids/pricing) are the remaining TODO.

Scope

Implements the adapter half of #107. The cross-provider sweep + aggregation run is the other half of Connorrmcd6/surface-bench#16; verification/compounding metrics are Connorrmcd6/surface-bench#13.

🤖 Generated with Claude Code

Cross-provider adapters for the multi-turn generalization sweep, so the
"capability doesn't buy rot-resistance" finding isn't Claude-only. Code
only — live smokes come later; exact model ids / pricing / per-model
params are flagged TODO at smoke time.

- models.py: OpenAIModel.step (Chat Completions + function tools) and
  GeminiModel.step (google-genai generate_content + function calling),
  each behind the same ToolModel protocol, with lazy SDK imports + key
  guards mirroring AnthropicModel. Pure, module-level converters for both
  (_openai_*/_gemini_*), incl. Gemini's function_response name resolution
  (it keys by name, not id). build_model gains openai/gemini via a small
  provider->class map.
- config.toml: [models.gpt] + [models.gemini] with placeholder ids/pricing
  (TODO at smoke).
- pyproject.toml: [providers] optional extra (openai, google-genai) — not
  needed for the Anthropic-only or offline paths; converters stay
  import-free so the suite runs without the SDKs.
- tests: 6 offline tests for the converters + response parsing using fake
  responses (no network). Suite: 30 passing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Connorrmcd6 Connorrmcd6 merged commit 17bd63e into feat/102-anthropic-step Jun 14, 2026
5 checks passed
@Connorrmcd6 Connorrmcd6 deleted the feat/107-openai-gemini-adapters branch June 14, 2026 20:08
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