Skip to content

fix(providers): OpenAI base_url (#222) + remove gemini runtime (#231) + Keycloak CI bootstrap (#218) - #237

Merged
RichardHightower merged 6 commits into
mainfrom
claude/project-review-direction-qsb513
Aug 30, 2026
Merged

fix(providers): OpenAI base_url (#222) + remove gemini runtime (#231) + Keycloak CI bootstrap (#218)#237
RichardHightower merged 6 commits into
mainfrom
claude/project-review-direction-qsb513

Conversation

@RichardHightower

@RichardHightower RichardHightower commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Three fixes plus the research-graph plan doc, ahead of the 10.5.0 release.

fix(providers) — OpenAI base_url ignored (#222)

Both the OpenAI embedding and summarization providers built AsyncOpenAI(api_key=api_key) without passing the configured base_url, so every request went to api.openai.com regardless of config.yaml. This made Agent Brain unusable with OpenAI-compatible endpoints (LiteLLM, vLLM, LocalAI, Azure OpenAI, internal gateways) and failed with APIConnectionError where there's no direct OpenAI egress.

Both now pass base_url=config.get_base_url() or None, matching what the Ollama and Grok providers already did. With no base_url configured the client keeps the standard OpenAI endpoint.

Reported by @stevemju, who also proposed this fix.

TDD, RED→GREEN verified. 6 new tests. With the fix reverted, the two base_url tests fail with exactly the reported symptom (https://gateway.internal/v1https://api.openai.com/v1); with it, they pass.

refactor(cli)! — remove the deprecated Gemini CLI runtime (#231)

Google deprecated the Gemini CLI, so rather than extend --with-mcp to it, the runtime is removed: runtime/gemini_converter.py deleted, plus GEMINI_TOOLS, RuntimeType.GEMINI, and the gemini entries in RUNTIME_CHOICES / INSTALL_DIRS / CONVERTERS. --agent gemini is now rejected as an invalid choice, which lists the four supported runtimes.

Gemini remains fully supported as an LLM provider. This touches only the deprecated CLI as an install target; summarization.provider: gemini and GEMINI_API_KEY are untouched. The two concerns were carefully separated.

Test coverage updated across 5 files; the "unsupported runtime" MCP test was repointed from gemini to skill-runtime (the remaining runtime without an MCP registrar).

fix(ci) — Keycloak E2E: test user not fully set up (#218)

scripts/keycloak_bootstrap.sh created testuser with only a username and password. Keycloak >= 24 enables the declarative User Profile with the Verify Profile required action on by default, which leaves such an account carrying VERIFY_PROFILE and makes every Direct Access Grant fail with:

HTTP 400 {"error":"invalid_grant","error_description":"Account is not fully set up"}

That matches the reported failure exactly — all 8 external-IdP tests dying at setup against the token endpoint in ~3.75s, never reaching MCP logic. The user is now created with email, emailVerified, firstName, lastName, and an explicit empty requiredActions.

⚠️ Unverified locally — no container runtime available in this environment. The MCP Keycloak Integration job is the confirming run. Flagged as such in the changelog too.

docs — research-graph plan

Lands docs/plans/research-graph-make-it-real.md in-repo per the project's planning rule (cherry-picked from claude/research-graph-okf-plugins-bl2ye3). Its one Agent Brain-side dependency is now tracked as #235.

Validation

task before-push — all four packages green:

Package Tests Lint Types
server 1414 passed, 28 skipped ✅ 88 files
cli 612 passed, 5 skipped ✅ 46 files
uds 32 passed ✅ 5 files
mcp 1021 passed, 118 deselected ✅ 47 files

YAML frontmatter: 53 files, 0 errors.

Notes for the reviewer

  • The reporter's other problem — >= 10.3.0 failing with an mcp dependency conflict — is not reproducible from a clean environment (all package combinations resolve cleanly on Python 3.10, and no path deps leaked into published metadata). Split out to #236 pending reporter details.
  • agent-brain-mcp's install task temporarily rewrites pyproject.toml to path dependencies and restores it only as its last statement. When it was interrupted by disk exhaustion during this work, it left publish-breaking path deps in the tree. Filed as #238, which also covers the lock guard not extending to the mcp/uds locks.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JtAMdptgnEFedoXJU9kqKQ

claude added 6 commits August 30, 2026 20:28
Both the OpenAI embedding and summarization providers constructed
AsyncOpenAI(api_key=api_key) without passing the base_url from
config.yaml, so every request went to api.openai.com regardless of
configuration. That makes Agent Brain unusable against any
OpenAI-compatible endpoint (LiteLLM, vLLM, LocalAI, Azure OpenAI, or an
internal gateway) and fails outright with APIConnectionError where there
is no direct OpenAI egress -- the on-prem/air-gapped case.

Both now pass base_url=config.get_base_url() or None, matching what the
Ollama and Grok providers already did. With no base_url configured the
SDK keeps the standard OpenAI endpoint, so existing setups are
unaffected.

Tests added for both providers cover the configured-endpoint and
default-endpoint paths; they fail without the fix, reproducing the
reported symptom exactly.

Reported by @stevemju.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JtAMdptgnEFedoXJU9kqKQ
Google deprecated the Gemini CLI, so rather than extend --with-mcp
auto-registration to it (the original plan in #225, closed as
superseded), the runtime is removed as an install target.

Removed: runtime/gemini_converter.py, the GEMINI_TOOLS tool map,
RuntimeType.GEMINI, and the gemini entries in RUNTIME_CHOICES,
INSTALL_DIRS and CONVERTERS. `install-agent --agent gemini` is now
rejected by click, whose error lists the four supported runtimes
(claude, opencode, skill-runtime, codex).

Gemini remains fully supported as an LLM provider: this touches only the
deprecated CLI as an install target, never summarization.provider gemini
or GEMINI_API_KEY.

The "unsupported runtime" MCP test used gemini as its subject; it is
repointed at skill-runtime, the remaining runtime with no MCP registrar.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JtAMdptgnEFedoXJU9kqKQ
All 8 external-IdP E2E tests died at setup with HTTP 400 from the
Keycloak token endpoint, never reaching MCP logic.

The bootstrap created testuser with only a username and password.
Keycloak >= 24 enables the declarative User Profile with the "Verify
Profile" required action on by default, which leaves such an account
carrying a VERIFY_PROFILE required action; every Direct Access Grant for
it then fails with

  400 {"error":"invalid_grant","error_description":"Account is not fully set up"}

That matches the observed signature: whole suite failing at setup
against the token endpoint, in seconds.

The user is now created with email, emailVerified, firstName, lastName
and an explicit empty requiredActions.

Not verified locally -- no container runtime is available in this
environment, so the MCP Keycloak Integration CI job is the confirming
run. The change is confined to the opt-in test bootstrap, which is
currently red in all cases.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JtAMdptgnEFedoXJU9kqKQ
Adds the Unreleased section covering the OpenAI base_url fix, the gemini
runtime removal, and the Keycloak bootstrap fix, and marks #231 shipped
in TODO.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JtAMdptgnEFedoXJU9kqKQ
Gap analysis across the OKF family (okf-plugin 0.8.x, okf-agent-graph 0.8.x,
research-knowledge-capture 0.2.x, okf-forge, okf-agent-graph-ui) and Agent
Brain server capabilities, with a phased plan: projection corpus + /index/add
wiring, live /research-ask ladder rungs 3-4, a deterministic /graph/project
ingestion path in agent-brain-server, and family-convention parity for the
research-graph plugin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EgKHRU6s3VQXoCQXtXrFrq
Converts the Unreleased section to a dated 10.5.0 heading so the release
pre-check (which requires a matching `## [X.Y.Z]` section) passes.

Minor rather than major: removing the deprecated Gemini CLI runtime is
technically breaking, but every inter-package pin is `^10.x`
(>=10.x,<11.0.0), so a major bump would force updating all cross-package
constraints for a runtime Google itself deprecated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JtAMdptgnEFedoXJU9kqKQ
@RichardHightower
RichardHightower merged commit f7923c5 into main Aug 30, 2026
3 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.

2 participants