Skip to content

Codex/pr 5 OpenAI custom endpoint#6

Merged
feelingsonice merged 4 commits into
mainfrom
codex/pr-5-openai-custom-endpoint
Apr 3, 2026
Merged

Codex/pr 5 OpenAI custom endpoint#6
feelingsonice merged 4 commits into
mainfrom
codex/pr-5-openai-custom-endpoint

Conversation

@feelingsonice

Copy link
Copy Markdown
Owner

No description provided.

anaxsouza and others added 4 commits April 2, 2026 21:50
This commit adds support for custom OpenAI-compatible endpoints, allowing
users to use providers like OpenCode Zen, Azure OpenAI, or self-hosted
models with Memory Bank.

Changes:
- Add DEFAULT_OPENAI_URL constant in memory-bank-app
- Add openai_url field to ServerSettings struct
- Add base_url field to LlmProviderConfig::OpenAi variant
- Support OPENAI_BASE_URL environment variable
- Update OpenAI client builder to use custom base_url when provided
- Update tests to include base_url field
- Add documentation to README.md

Example usage:
  export OPENAI_BASE_URL=https://opencode.ai/zen/v1
  export OPENAI_API_KEY=your-key
  mb service restart

Closes: feelingsonice/MemoryBank#<issue_number>
Rust pattern matching requires all struct fields to be mentioned or
explicitly ignored with '..' or '_'. Added '..' to ignore api_key in the
OpenAi variant pattern.
@feelingsonice

Copy link
Copy Markdown
Owner Author

@anaxsouza you can now set a custom endpoint via mb setup:

Screenshot 2026-04-03 at 12 03 12 PM

@feelingsonice
feelingsonice merged commit 960d6a0 into main Apr 3, 2026
1 check passed
@feelingsonice
feelingsonice deleted the codex/pr-5-openai-custom-endpoint branch April 3, 2026 19:09
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