feat: support custom LLM endpoints for local AI servers#54
Open
max-baeumler wants to merge 2 commits intoknostic:masterfrom
Open
feat: support custom LLM endpoints for local AI servers#54max-baeumler wants to merge 2 commits intoknostic:masterfrom
max-baeumler wants to merge 2 commits intoknostic:masterfrom
Conversation
Add configurable base_url, model names, SSL verification, and extended
timeouts so OpenAnt can run against any Anthropic-compatible API server
(llama-swap, llama-server, vLLM, LM Studio, etc.) instead of requiring
Anthropic's cloud API.
Changes:
Config (Go CLI):
- Add base_url, opus_model, sonnet_model, verify_ssl to config.json
- New config keys: base-url, opus-model, sonnet-model, verify-ssl
- Pass settings to Python core via environment variables
- Skip Anthropic API key validation when custom base_url is set
LLM client (Python core):
- New utilities/config.py: resolve_model(), create_anthropic_client(),
extract_text() helpers
- All 8 direct anthropic.Anthropic() calls routed through factory
- All 15+ hardcoded Claude model strings replaced with resolve_model()
- Extended connect timeout (300s) for model cold-start / swap
- Configurable SSL verification for self-signed certs
- extract_text() handles thinking/reasoning model responses
(ThinkingBlock before TextBlock)
Usage:
openant config set base-url # http://localhost:8080
openant config set api-key # any non-empty value
openant config set opus-model # e.g. qwen3:32b
openant config set sonnet-model # e.g. qwen3:8b
openant config set verify-ssl # false (for self-signed certs)
openant scan /path/to/repo
Fully backwards compatible — defaults to Anthropic cloud API with
original Claude model names when no custom endpoint is configured.
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.
Add configurable base_url, model names, SSL verification, and extended timeouts so OpenAnt can run against any Anthropic-compatible API server (llama-swap, llama-server, vLLM, LM Studio, etc.) instead of requiring Anthropic's cloud API.
Changes:
Config (Go CLI):
LLM client (Python core):
Usage:
openant config set base-url # http://localhost:8080
openant config set api-key # any non-empty value
openant config set opus-model # e.g. qwen3:32b
openant config set sonnet-model # e.g. qwen3:8b
openant config set verify-ssl # false (for self-signed certs)
openant scan /path/to/repo
Fully backwards compatible — defaults to Anthropic cloud API with original Claude model names when no custom endpoint is configured.