Repository navigation
Proxima v1.3.0
What's changed
Added
- OpenAI provider (
lib/providers/openai_provider.dart) — third provider alongside Anthropic and Ollama, with native tool calling and SSE streaming.--model openai/gpt-4o,openai_api_key/OPENAI_API_KEY. Handles the four wire-format divergences from Anthropic: the system prompt is sent as arole: "system"message rather than a top-level field; tool schemas nest underfunction/parameters; tool results userole: "tool"withtool_call_id; and assistanttool_calls[].function.argumentsis a JSON-encoded string, not an object.tool_calls[].idis preserved intoToolCall.callId— OpenAI rejects atool_call_idit did not issue, and the agent loop replays it on the next request. Omitstemperaturefor the o-series reasoning models, which accept only their default and reject an explicit value — including0.0— with a 400. Usesmax_completion_tokens(max_tokensis deprecated and rejected byo*models) and setsstream_options.include_usageso streamed responses still report token usage and cost - Injectable
openai_base_url— the same provider serves any endpoint speaking the OpenAI wire format (Groq, Together, OpenRouter, LM Studio) with no new provider class. Azure OpenAI is not supported: it requires anapi-keyheader, a deployment-specific path, and anapi-versionquery parameter - Robust transport handling — a
ClientExceptionfrom an unreachable endpoint is converted toLLMError(LLMErrorKind.network)on both request paths and the mid-stream body, so a configuredfallback_modelis actually tried during a network outage (FallbackProvidercatches onlyLLMError) - Per-model context windows —
capabilities.contextWindowis derived from the selected model rather than a flat figure, becauseContextBuilderbudgets the whole session — including a 10% output allowance — from it. Known OpenAI families match by prefix; anything unrecognised gets a conservative 8K, overridable withopenai_context_window - Provider-aware credential hints — an auth failure names the active provider's environment variable rather than always
ANTHROPIC_API_KEY - Single credential source for subagents — the
critic_on_writesubagent and the agent loop now share one_buildProviderRegistry()helper, so a provider's credentials cannot reach one and not the other - OpenAI pricing in
CostCalculatorfor gpt-4o, gpt-4o-mini, gpt-4-turbo, o3, and o3-mini - HTTP-level provider tests — first use of
package:http/testing.dart'sMockClientin this repo, injected through the existinghttp.Client?constructor seam. 23 tests assert the decoded request body and parsed response, covering all four wire divergences, error-code mapping, SSE streaming, and model discovery. 9 further tests coverProviderRegistrydispatch
Changed
- Model lists are no longer hardcoded in the CLI — the
/modelpicker and tab completion now build their list fromLLMProvider.listModels().OpenAIProviderandOllamaProviderdiscover models live — OpenAI filtering is an exclusion list rather than an allow-list, so chat models from compatible endpoints (Groq, Together, OpenRouter, LM Studio) survive discovery instead of being filtered out;AnthropicProviderreturns a static list. New OpenAI and Ollama releases appear with no code change. Removes the duplicatedSlashCommandHandler.anthropicModelsconst and its copy inrepl.dart. Live fetches run in the background at REPL start, are re-tried in the picker only when stdout is a TTY, and always degrade to[]— the picker still works offline
Installation
macOS / Linux — install script
curl -fsSL https://raw.githubusercontent.com/jizzel/proxima/main/install.sh | shmacOS (Apple Silicon + Intel via Rosetta 2)
curl -fsSL https://github.com/jizzel/proxima/releases/download/v1.3.0/proxima-macos-arm64 \
-o /usr/local/bin/proxima && chmod +x /usr/local/bin/proximaLinux (x86_64)
curl -fsSL https://github.com/jizzel/proxima/releases/download/v1.3.0/proxima-linux-x64 \
-o /usr/local/bin/proxima && chmod +x /usr/local/bin/proximaWindows (x86_64) — PowerShell
irm https://raw.githubusercontent.com/jizzel/proxima/main/install.ps1 | iexOr download proxima-windows-x64.exe below and add it to a directory on your PATH.