fix(providers): OpenAI base_url (#222) + remove gemini runtime (#231) + Keycloak CI bootstrap (#218) - #237
Merged
Conversation
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
temporarily deployed
to
ci-testing
August 30, 2026 21:05 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three fixes plus the research-graph plan doc, ahead of the 10.5.0 release.
fix(providers)— OpenAIbase_urlignored (#222)Both the OpenAI embedding and summarization providers built
AsyncOpenAI(api_key=api_key)without passing the configuredbase_url, so every request went toapi.openai.comregardless ofconfig.yaml. This made Agent Brain unusable with OpenAI-compatible endpoints (LiteLLM, vLLM, LocalAI, Azure OpenAI, internal gateways) and failed withAPIConnectionErrorwhere 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 nobase_urlconfigured 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_urltests fail with exactly the reported symptom (https://gateway.internal/v1→https://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-mcpto it, the runtime is removed:runtime/gemini_converter.pydeleted, plusGEMINI_TOOLS,RuntimeType.GEMINI, and thegeminientries inRUNTIME_CHOICES/INSTALL_DIRS/CONVERTERS.--agent geminiis now rejected as an invalid choice, which lists the four supported runtimes.Test coverage updated across 5 files; the "unsupported runtime" MCP test was repointed from
geminitoskill-runtime(the remaining runtime without an MCP registrar).fix(ci)— Keycloak E2E: test user not fully set up (#218)scripts/keycloak_bootstrap.shcreatedtestuserwith 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 carryingVERIFY_PROFILEand makes every Direct Access Grant fail with: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 emptyrequiredActions.MCP Keycloak Integrationjob is the confirming run. Flagged as such in the changelog too.docs— research-graph planLands
docs/plans/research-graph-make-it-real.mdin-repo per the project's planning rule (cherry-picked fromclaude/research-graph-okf-plugins-bl2ye3). Its one Agent Brain-side dependency is now tracked as #235.Validation
task before-push— all four packages green:YAML frontmatter: 53 files, 0 errors.
Notes for the reviewer
>= 10.3.0failing with anmcpdependency 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'sinstalltask temporarily rewritespyproject.tomlto 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