✨ Add --base-url option and update default models - #12
Open
jufty-bot wants to merge 6 commits into
Open
Conversation
- Add --base-url / LLM_BASE_URL env var for custom API endpoints - Pass base_url through to ChatOpenAI (openai_api_base), ChatAnthropic (anthropic_api_url), ChatMistralAI (endpoint), and ChatOllama (base_url) - Bump default models: gpt-5.6-sol (OpenAI), claude-sonnet-5 (Anthropic), mistral-large-latest (MistralAI), llama3.2 (Ollama)
- Bump langchain~=0.2 → langchain>=1, langchain-core>=1 - Bump langchain-openai~=0.1 → langchain-openai>=1 - Bump langchain-anthropic~=0.1 → langchain-anthropic>=1 - Bump langchain-mistralai~=0.1 → langchain-mistralai>=1 - Replace langchain-community ChatOllama with langchain-ollama>=0.1 - Update imports: langchain.llms/schema → langchain_core - ChatAnthropic: model_name → model (v1 API) - Bump requires-python to >=3.10 (langchain v1 minimum) - Drop Python 3.8/3.9 from classifiers and hatch matrix
- Drop Python 3.8/3.9 from CI test matrix, add 3.13 - Fix UP035: typing.Iterator -> collections.abc.Iterator (py310+) - Fix RUF022: sorted __all__ in __init__.py - Ignore PLC0415: intentional lazy imports for optional providers
- base_url flag presence in CLI help - base_url propagation to all provider constructors - base_url omitted when not set - default model values for all providers - custom model override of default - temperature=1 for ChatOpenAI GPT-5.x compat
- GPT-5.x compat is now handled by langchain-openai v1's validate_temperature which auto-strips temperature from reasoning model requests
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
Adds a
--base-url/LLM_BASE_URLoption for connecting to custom API endpoints (proxies, local servers, alternative providers) and bumps default model versions to the latest available.Changes
llm_term/cli.py— Add--base-url(-b) CLI option withLLM_BASE_URLenv var supportllm_term/utils.py— Passbase_urlthrough to each provider's constructor:ChatOpenAI→openai_api_baseChatAnthropic→anthropic_api_urlChatMistralAI→endpointChatOllama→base_urlgpt-4o→gpt-5.6-solclaude-3-5-sonnet-20240620→claude-sonnet-5mistral-small-latest→mistral-large-latestllama3→llama3.2Test Plan
--base-urloption