Commit History
-
feat: theme dashboard charts and expose admin UI on HF Spaces
shinmentakezo078bdd0d7
-
feat: track local-path usage and enrich analytics dashboard
shinmentakezo07- Record server-tool and local-optimization requests in the usage ledger - Relay cache read/creation tokens into Responses usage details - Add cache/reasoning KPIs, request-log pagination, heatmap metric toggle, latency tooltips, and a sticky sidebar in the Admin UI - Rebuild admin static assets for the updated dashboard - Add usage-tracking and cache-token relay tests - Bump version to 4.28.0c860470 -
feat: add usage tracking with live throughput rates and analytics dashboard
shinmentakezo07 +1: ClaudeTrack per-request token usage (input/output/cache/reasoning) plus full prompts (capped at 64 KB) in a JSON ring buffer at ~/.fcc/usage.json, captured through a transparent UsageTrackingStream over the executor stream. Expose GET /admin/api/usage and a new Usage page in the admin UI with KPI cards, token mix, volume area chart, top endpoints, routing sankey, and hourly heatmap, auto-refreshing every 10 seconds. Throughput rates use a trailing 60-second live window on both backend and frontend so they track real-time traffic and decay to zero when idle; tokens/second counts output tokens only, tokens/minute counts input plus output. Bump 4.25.0 -> 4.27.0. Co-Authored-By: Claude <noreply@anthropic.com>e8f2acc -
feat: surface saved endpoint models and revamp the admin UI
shinmentakezo07Model ids saved per OpenAI-compatible endpoint on the admin page are now included in the admin model options and provider status, so numbered routes (openai_compatible_1/<model>) stay listed even when the endpoint's live /models route is unreachable. - settings: OpenAI-compatible instances persist an optional models list - status: endpoint cards report saved model ids alongside live ones - admin API: model options merge configured, discovered, and stored ids - tests: stored endpoint models appear in options/status; config round-trip Admin UI overhaul: - dark mode toggle (system-aware, persisted) with a light/dark token pass - responsive sidebar: off-canvas drawer with backdrop/Escape on mobile - sticky blurred header (view icon, title, description, version) and a sticky action bar with status icons and a dirty-count badge - config sections become cards with per-section icons and a model refresh action; fields gain source badges and description hints - provider/connected-account c…ee2cd20 -
fix: cache-bust admin UI and show the running version
shinmentakezo07The admin UI required a hard refresh after every deploy: the bundle was emitted with fixed filenames (assets/admin.js, assets/admin.css) even though the server already sent Cache-Control: no-store. Any cache that ignored or reused those URLs (browser memory/disk cache, back-forward cache, or an edge proxy in front of the deployment) kept serving the old bytes, since the URL never changed between deploys. - vite emits content-hashed filenames (admin-[hash].js/.css), so each build references new URLs and stale caches become inert by construction; index.html stays no-store and always fresh - admin config API now returns the installed package version (api -> core import, respecting the config package's dependency policy) and the header shows a vX.Y.Z badge, so a deployed update is visible without digging - cache-policy contract test now covers every built asset instead of the fixed names; version presence asserted in the manifest test - version 4.23.0 -> 4.23.11c54cf1 -
fix: make model combobox editable and searchable in Model Routing
shinmentakezo07The model field combobox looked searchable but was broken: the input was controlled by the committed value so keystrokes were reverted, typed text could never be committed (the empty state promised a custom slug that was impossible to enter), Enter only worked after arrow selection, and blur discarded the draft. Rewrite it as a true editable+searchable combobox: - the input shows the draft text while editing, so model ids can be typed or edited in place (WYSIWYG: the text in the box is the value) - filtering over the model list now reacts to visible typing - Enter commits the highlighted option, or the typed text as a custom model id when nothing is highlighted - blur commits the draft (exact option match selects the canonical option; anything else becomes a custom id); Escape reverts - stale filter/query and arrow index state reset on open/query change - version 4.22.1 -> 4.23.0c03ea68 -
feat: admin dedicated pages, pool key management, keypool quotas (#1350)
shinmentakezo07- Admin UI becomes a Vite build under frontend/ with hash-routed dedicated pages (#/providers, #/model-config, #/messaging); the providers view renders only on its page. - Pool fields support reveal/edit/remove of individual keys via a new loopback-only GET /admin/api/pools/{field_key} endpoint; apply resolves tokens mixed with raw edits against stored keys. - admin assets now serve Cache-Control: no-store, fixing stale-bundle breakage after the frontend migration. - ApiKeyPool gains per_key_quota rotation plus transient HTTP 429/5xx/overload failover rotation with mark_failure. - CI runs the frontend build and verifies committed admin assets.9b71fd0 -
feat: add key management and provider keypool (# new feature)
shinmentakezo07 +1: Claude- Add src/free_claude_code/config/admin/keys.py - Add src/free_claude_code/providers/keypool.py - Add corresponding test files - Update admin static assets and config files - Bump version to 4.18.0 Co-Authored-By: Claude <noreply@anthropic.com>2c96ecb
-
Use codebase .env for server and admin config
shinmentakezo07Settings and the Admin UI now load and persist config from the repo-local .env instead of the user-managed ~/.fcc/.env, so a codebase .env is always authoritative. Admin writes target the repo .env, and the managed env source label is removed from the Admin UI.3cc3731
-
Restore OpenAI subscription generation compatibility (#1326)
Unverified signature## Problem OpenAI subscription generations failed because FCC sent public Responses fields that the private Codex backend rejects. Valid backend SSE without a `Content-Type` header was then misclassified as non-streaming. Fixes #1320. ## Changes | Before | After | | --- | --- | | Private Codex requests forwarded `max_output_tokens` and `metadata`. | Private Codex requests omit those unsupported public fields while leaving the neutral Responses contract unchanged. | | Successful streams required `text/event-stream`. | Successful streams may omit `Content-Type`; explicitly declared non-SSE responses retain the bounded failure path. | | Non-SSE HTTP 2xx diagnostics depended on the header gate. | Non-SSE HTTP 2xx bodies remain retryable failures with bounded, redacted diagnostics. | | Compatibility coverage assumed canonical response headers. | Provider and API tests cover private projection, immutable input, headerless SSE success, explicit non-SSE failures, bounded diagnostics, and du…f412f5f
-
Restore Claude Code client controls for OpenAI Responses (#1311)
Unverified signature## Problem Claude Code sends effort and keep-all context controls that the connected OpenAI provider rejected before upstream I/O. The Responses converter revalidated application-owned effort and could not distinguish inert context edits from active unsupported behavior. Fixes #1310. ## Changes | Before | After | | --- | --- | | Every non-empty `output_config` failed OpenAI Responses preflight. | Application-consumed `output_config.effort` reaches one policy-derived OpenAI `reasoning` object. | | Every non-empty `context_management` failed OpenAI Responses preflight. | Empty edits and exact keep-all thinking edits are omitted as semantic no-ops. | | Structured output, active edits, and unknown controls shared coarse top-level diagnostics. | Unrepresentable controls still fail before I/O with precise nested output paths. | | The current Claude request shape had no end-to-end regression contract. | Core, real-provider, and `/v1/messages` tests lock conversion, immutability, wire paylo…1b6cc04
-
Add Codex App model catalog support (#1297)
Unverified signature## Problem The Codex App cannot discover FCC provider/model slugs because it loads a local model catalog at startup instead of querying FCC's `/v1/models` endpoint. Users can configure FCC as a Responses provider, but its native model picker remains incomplete. Fixes #1260. ## Changes | Before | After | | --- | --- | | FCC generated the Codex catalog only when `fcc-codex` launched. | FCC synchronizes the catalog from its canonical model lifecycle for independently launched Codex clients. | | Startup could leave a configured Codex App without a catalog file. | Startup creates a missing catalog after routed-provider warming and preserves an existing last-known-good catalog. | | Every catalog publication replaced the file. | Identical content is skipped and changed content is replaced atomically. | | Catalog filesystem failures could escape a direct writer call. | Runtime publication is fail-open and logs only the exception type. | | Codex App setup was undocumented. | The README docum…49fa921
-
Add ChatGPT OAuth as an OpenAI Codex provider (#1279)
Unverified signature## Problem FCC supports API-key and local providers, but customers cannot use models included with their ChatGPT subscription. Reusing Codex credentials would also couple FCC to another application's mutable authentication state. ## Changes | Before | After | | --- | --- | | OpenAI subscription access was unavailable. | Customers connect ChatGPT from the local Admin UI with browser PKCE or device code. | | Provider availability came only from static settings. | A process-owned connected account adds, refreshes, and evicts OpenAI models dynamically. | | FCC had no ChatGPT Codex transport. | `openai/<model-id>` uses FCC-owned renewable credentials and neutral Responses conversion. | | Retries and reasoning continuity had no subscription-provider coverage. | Commit-boundary retries prevent duplicate output while encrypted reasoning and tool IDs survive round trips. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR adds ChatGPT OAuth and a…9fb95ba
-
Preserve gateway model identity in Anthropic responses (#1270)
Unverified signature## Problem FCC replaced the stable gateway model selected by Claude Code with the provider-facing model when serializing Anthropic responses. Claude then persisted an ID absent from FCC's `/v1/models` catalog, so later sessions warned that the model could not be restored and fell back. This partially addresses #1269. ## Changes | Before | After | | --- | --- | | Provider streams, local optimizations, and local server-tool responses exposed the routed upstream model. | Every Anthropic response path receives and emits the original gateway model while upstream requests retain the provider model. | | Traces labeled the routed upstream ID as the gateway model. | Routing, execution, provider, and token-count traces preserve both identities accurately. | | No contract guarded model identity across routing and response serialization. | Tests cover executor handoff, upstream request bodies, Anthropic `message_start`, local optimizations, and server tools; the patch version is `4.12.10`. | <…82e8d6e
-
Report provider permission denials as HTTP 403 (#1249)
Unverified signature## Problem Provider HTTP 403 responses were categorized as generic API failures or rewritten as authentication 401 errors. Users received misleading diagnostics for credential or model-access denials, as reported in #1242. ## Changes | Before | After | | --- | --- | | Typed and generic OpenAI 403 errors fell through to generic API failures. | Typed and generic OpenAI 403 errors become canonical permission failures. | | Raw HTTP 403 errors were rewritten as authentication failures with status 401. | Raw HTTP 403 errors retain permission semantics and status 403. | | Permission diagnostics used generic provider-failure wording. | Permission diagnostics advise checking credential permissions and model access while retaining redacted upstream detail. | | Access-denial wire behavior was implicit. | Messages and Responses return `permission_error` with `x-should-retry: false`. | | The package version was 4.12.2. | The package version is 4.12.3. | <!-- greptile_comment --> <details open>…7b4e84b
-
Make ProviderModelInfo the sole model-catalog contract (#1222)
Unverified signature## Problem Provider model discovery consumes metadata, but providers and the cache still expose a parallel IDs-only contract. The duplicate contract adds adapters and lets tests bypass capability metadata. ## Changes | Before | After | | --- | --- | | `BaseProvider` exposed `list_model_ids()` plus a metadata adapter. | `BaseProvider` exposes only abstract `list_model_infos()` returning application-owned metadata. | | Ordinary providers parsed IDs and converted them later. | Ordinary providers parse OpenAI-compatible catalogs directly into `ProviderModelInfo` values. | | OpenRouter, Cloudflare, and GitHub Models maintained redundant IDs-only wrappers. | Provider-specific filters and capability metadata have one return path. | | Vertex returned paginated IDs for the base adapter to wrap. | Vertex returns metadata after completing the same paginated discovery flow. | | The runtime cache exposed test-only raw-ID write and prefixed-ID read helpers. | The runtime cache accepts and returns…7c0961b -
Make provider model discovery the sole catalog owner (#1221)
Unverified signature## Problem Startup model-list I/O was split between a non-enforcing configured-model validator and the real discovery path. Both queried providers and populated the same cache even though synchronous cache warm-up was the validator's only required effect. ## Changes | Before | After | | --- | --- | | Validation and discovery independently resolved providers, queried model lists, and cached results. | `ProviderModelDiscovery` solely owns model-list queries, failure reporting, and cache population. | | Startup ran configured-model validation and then launched discovery. | Startup synchronously warms referenced providers through discovery, then launches the existing missing-provider background pass. | | Absence from a provider catalog produced a non-enforcing missing-model warning. | Provider catalogs remain discovery metadata and provider execution remains authoritative. | | Configured model references retained environment-source metadata for validator diagnostics. | Configured model …1fe45a3
-
Recover Claude sessions from provider context overflow (#1215)
Unverified signature## Problem NVIDIA NIM can report context exhaustion as a 400 `BadRequestError` saying its derived `max_tokens` is negative. FCC treated that as a generic invalid request, so Claude Code could not recognize the smaller upstream context window, compact the conversation, and replay the interrupted turn. LM Studio also encoded Claude's recovery phrase inside provider code instead of reporting a protocol-neutral failure. Fixes #1198. ## Changes - Add one protocol-neutral `context_window_exceeded` execution failure with a non-retryable 400 contract. - Narrowly classify only NVIDIA NIM's negative derived-`max_tokens` signature while preserving the complete redacted provider diagnostic and request ID. - Let the Anthropic serializer alone add Claude's `prompt is too long` compaction trigger; OpenAI Responses keeps a standard invalid-request envelope. - Migrate LM Studio's existing context preflight to the same neutral semantic and document the ownership boundary. - Add provider, protocol, API,…838ef01 -
Coordinate provider recovery under concurrent load (#1205)
Unverified signature## Problem Concurrent transient failures could start independent retry, replay, continuation, and repair loops while holding provider concurrency slots. This multiplied upstream attempts and could delay or strand terminal errors under fan-out. ## Changes | Before | After | | --- | --- | | Retry paths owned separate attempt budgets. | One logical-execution session caps all upstream work at five attempts. | | Concurrent failures backed off independently. | One provider-owned recovery episode elects a single half-open probe while followers coalesce. | | Backoff occupied stream concurrency. | Concurrency is held only while an upstream operation or stream is active. | | Provider catalog calls and stream creation used separate admission paths. | Every upstream operation uses one provider-generation admission controller. | | Cancellation could leave recovery ownership or follower state unresolved. | Cancellation releases permits, transfers probe ownership, and unregisters waiting followers…3a9bf35
-
Add Google Vertex AI with renewable ADC (#1193)
Unverified signature## Problem | Before | After | | --- | --- | | FCC supported Google AI Studio API keys but could not route coding agents through a Google Cloud Vertex AI project. | `vertex/...` routes through Google's [documented OpenAI-compatible Chat Completions endpoint](https://cloud.google.com/vertex-ai/generative-ai/docs/start/openai), using the global endpoint by default or an explicitly configured region. | | A pasted Vertex access token would expire, while Application Default Credentials were not part of provider construction. | FCC loads [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials), supplies a renewable credential callback to the OpenAI transport, coalesces concurrent refreshes, and returns typed authentication or transient failures. | | Vertex does not expose its model catalog through the compatible OpenAI `/models` route. | FCC translates its generic discovery operation to Google's paginated [publisher-model list API](https…cabd2d4 -
Add Amazon Bedrock Mantle support (#1192)
Unverified signature## Problem FCC cannot route coding-agent requests through Amazon Bedrock even though Bedrock Mantle exposes an OpenAI-compatible streaming Chat Completions API. Users currently need a separate compatibility layer, and FCC has no catalog, Admin UI, model-discovery, or smoke-test contract for Bedrock. Fixes #863. ## Changes | Before | After | | --- | --- | | Amazon Bedrock was absent from provider routing. | `bedrock/` uses the existing OpenAI Chat provider with AWS's [Bedrock Mantle endpoint](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-chat-completions-mantle.html). | | Bedrock integration would have implied a new AWS-native transport. | The ordinary profile owns streaming, tools, retries, and `/models` discovery without boto3, SigV4, Converse, or Invoke machinery. | | FCC had no Bedrock authentication or regional endpoint configuration. | `AWS_BEARER_TOKEN_BEDROCK`, `BEDROCK_BASE_URL`, and `BEDROCK_PROXY` are available through environment and Admin UI configuratio…cc8e5d2
-
Report output-limit truncation as incomplete Responses (#1180)
Unverified signature## Problem Responses streams discarded the canonical Anthropic `max_tokens` stop reason and emitted `response.completed`. Codex therefore treated truncated provider output as a successful end and could stop midway without explaining why. Fixes #1178. ## Changes | Before | After | | --- | --- | | The Responses boundary discarded `message_delta.stop_reason`. | The Responses assembler retains the canonical terminal stop reason. | | Output-limit streams ended with `response.completed`. | Output-limit streams end with `response.incomplete` and `incomplete_details.reason=max_output_tokens`. | | Truncated output had no dedicated Responses contract coverage. | Core and API tests cover partial-output and zero-visible-output truncation while preserving response ID and usage. | | The package version was `4.8.6`. | The patch release is `4.8.7`. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR reports Anthropic output-limit termination as an incom…3608de3
-
Prevent the admin UI from being served from cache (#1160)
Unverified signature## Problem Browsers could retain the local admin page, assets, or error responses, leaving users on stale UI state after an FCC update. ## Changes | Before | After | | --- | --- | | Admin responses had no complete cache policy, and route-level handling missed exception responses. | A dedicated admin response boundary sends `Cache-Control: no-store` for every `/admin` response, including 403, 404, validation, and unexpected errors. | | Admin API fetches used the browser's default cache mode. | Admin API fetches explicitly use `cache: "no-store"`. | | Cache behavior was untested. | Tests cover HTML, assets, JSON, failure responses, and path scoping. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR prevents browsers from retaining stale admin UI responses. The main changes are: - Adds `Cache-Control: no-store` to successful and error responses under `/admin`. - Sets admin API fetches to use the browser's `no-store` cache mode. - Adds te…98786ea -
Make reasoning policy provider-neutral and client-aware (#1148)
Unverified signature## Problem FCC reduced reasoning to global and route booleans, mixing client intent, configuration, provider wire capabilities, output visibility, and history replay. That discarded named client efforts, encouraged model-name checks, and made provider behavior inconsistent. ## Changes | Before | After | | --- | --- | | Admin exposed global and route thinking toggles. | Admin exposes **Off**, **From client**, **Low**, **Medium**, **High**, **X-High**, and **Max**; Fable, Opus, Sonnet, and Haiku also expose **Inherit**. | | Request intent was repeatedly reduced to a boolean across routing and providers. | The application boundary resolves one immutable `ReasoningPolicy` with independent control, named effort, and exact positive token budget. | | Provider adapters could infer reasoning behavior from upstream model names or versions. | Provider profiles translate only documented provider-wide wire capabilities; architecture and contributor rules prohibit model-specific reasoning branche…dc04eee
-
Add LOG_LEVEL env var to control log verbosity (#1142)
wocessade +1: LastNoobUnverified signature## Problem The server always writes DEBUG logs, producing detailed request traces customers rarely need and allowing rotated files to accumulate without a retention cap. Supervised restarts also need to apply changed logging settings consistently. Closes #1141. ## Changes | Before | After | | --- | --- | | The file sink always starts at `DEBUG`. | `LOG_LEVEL` supports `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `CRITICAL`, with a customer-friendly `INFO` default. | | Structured request traces are emitted at `INFO`. | Structured request traces are emitted at `DEBUG` and remain available for opt-in diagnostics. | | Logs rotate at 50 MB without a retention limit. | Logs retain five rotated files, bounding normal usage to roughly 300 MB including the active file. | | Supervised restarts can keep stale sink and third-party logger levels. | Supervised restarts replace the sink or third-party levels only when their effective settings change. | | The package version is `4.7.2`. | The package v…d1b56bd -
Add an explicit searchable model dropdown (#1133)
Unverified signature## Problem Admin model fields depended on the browser's native datalist. Filtering worked, but browsers did not consistently expose a visible dropdown for browsing the full model catalog. ## Changes | Before | After | | --- | --- | | Model fields relied on browser-native datalist behavior. | Model fields use one FCC-owned searchable combobox with a visible chevron. | | Suggestions became discoverable only through browser-specific interactions. | Clicking the field or chevron opens the full catalog, while typing filters it. | | Keyboard navigation and empty results depended on native picker behavior. | Arrow keys, Enter, Escape, empty-state guidance, custom slugs, and None are handled explicitly. | | Selects and model fields rendered separate dropdown indicators. | Both controls use the same shared chevron asset. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR replaces native model datalists with an explicit searchable combobox. The m…1db2c84
-
Preserve mid-conversation system messages through provider conversion (#1125)
Unverified signature## Problem FCC hoisted inline Anthropic `system` messages into the top-level system prompt during request validation. Mid-conversation system messages are position-sensitive, so this applied later instructions retroactively, changed the existing prompt/cache prefix, and prevented provider conversion from seeing the original transcript. ## Changes - Preserve inline `system` messages, content, metadata, and ordering in Messages and token-count requests while keeping the top-level system prompt distinct. - Convert text-only inline system messages to OpenAI Chat `system` messages at the same transcript position; reject unrepresentable inline blocks before streaming instead of silently dropping them. - Remove the lossy normalization path and its unused role enum, and document protocol-model versus target-conversion ownership in `ARCHITECTURE.md`. - Cover API routing, model serialization, cache-prefix stability, text blocks, tool-result ordering, invalid content, and token counting; bump …b12d65f -
Add searchable model selection to the Admin UI (#1121)
Unverified signature## Problem Admin model routing fields required users to construct provider-prefixed model slugs. Optional tier overrides represented inheritance as an unexplained blank value. ## Changes | Before | After | | --- | --- | | Model inputs only gained suggestions after an individual provider refresh. | Model inputs load configured and discovered canonical slugs from one Admin catalog. | | Model routing looked like unrestricted text entry. | Model routing uses the browser's searchable model dropdown while retaining manual entry. | | Tier overrides displayed an empty value for fallback routing. | Tier overrides display **None** and persist it as an unset override. | | Model refresh returned provider-shaped cache internals. | Model refresh returns the same canonical catalog consumed by the Admin UI. | | Users inferred the provider/model slug format from examples. | The Admin UI and README define and present complete provider/model slugs. | <!-- greptile_comment --> <details open><summary>…0ff89da
-
Add Ollama Cloud as a first-class provider (#1106)
Unverified signature## Problem FCC supports Ollama only through a local daemon, so users cannot authenticate directly to Ollama Cloud or discover its hosted models from the Admin UI. Ollama's OpenAI-compatible API also uses the standard `reasoning` field instead of `reasoning_content`, which would otherwise drop thinking output and tool-history reasoning. ## Changes | Before | After | | --- | --- | | `ollama/...` requires a local Ollama server. | `ollama_cloud/...` connects directly to `https://ollama.com/v1` with `OLLAMA_API_KEY`, while local Ollama remains unchanged. | | OpenAI-chat reasoning was hard-coded to `reasoning_content`. | Provider profiles declare their reasoning field, so Ollama streams and replays `reasoning` without a specialized transport. | | Ollama Cloud was absent from configuration, model discovery, docs, and smoke coverage. | The catalog, Admin UI, proxy setting, model picker, README, smoke matrix, and `4.5.0` release metadata expose the provider consistently. | <!-- greptile_com…a8c6fae
-
Add Fable as a first-class Claude routing tier (#1099)
Unverified signature## Problem Claude Code now sends `claude-fable-5` for the Fable alias, but FCC treated it as an unrecognized model and collapsed it into the global fallback route. Users could not map Fable traffic or reasoning behavior independently. Fixes #1097. ## Changes | Before | After | | --- | --- | | Fable requests inherited `MODEL` and `ENABLE_MODEL_THINKING`. | Fable requests use `MODEL_FABLE` and `ENABLE_FABLE_THINKING` when configured, otherwise inherit the existing defaults. | | `/v1/models` omitted Claude Fable 5. | `/v1/models` advertises the canonical `claude-fable-5` identifier. | | Admin, documentation, validation, and smoke contracts described three Claude tiers. | Admin, documentation, validation, and smoke contracts describe Fable alongside Opus, Sonnet, and Haiku. | | The package version was `4.3.1`. | The package version is `4.4.0`. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR adds Fable as a Claude routing tier. The main c…3d8524a -
Fix Auto Mode classifier responses when stream is omitted (#1098)
Unverified signature## Problem Claude Code Auto Mode classifier requests omit `stream`, which means they expect a non-streaming Messages response. FCC treated omission as streaming, returned SSE, and caused Claude to report the classifier model as temporarily unavailable. Fixes #1094. ## Changes | Before | After | | --- | --- | | Omitted `stream` defaulted to streaming SSE. | Omitted `stream` defaults to a complete JSON Message; only `stream: true` selects SSE. | | Classifier side queries received a body without top-level `usage`. | Classifier side queries receive a JSON Message with top-level `usage` while thinking remains disabled. | | Tests encoded FCC's nonstandard streaming default. | Model and HTTP-boundary tests enforce Anthropic's response-mode contract. | | The package version was 4.3.0. | The package version is 4.3.1. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR fixes Messages response mode handling when clients omit `stream`. The main chan…f9017b8 -
Make proxy authentication bearer-only across every client (#1096)
Unverified signature## Problem Proxy authentication selected the first of three credential headers, so a stale `X-API-Key` could mask valid bearer authorization and leave Claude CLI or IDE clients at their login gate. Fixes #902. ## Changes | Before | After | | --- | --- | | FCC accepted three proxy credential headers and stripped legacy model suffixes. | FCC accepts one exact `Authorization: Bearer` token without mutation. | | Conflicting provider credentials could override valid proxy authorization. | Unrelated credential headers are ignored during proxy authentication. | | Codex catalog discovery and Pi catalog or inference paths used API-key authentication. | Every FCC-owned Codex and Pi path uses bearer authorization. | | Authentication failures referred ambiguously to an API key. | Authentication failures identify the proxy authentication token. | | FCC reported version `4.2.0`. | FCC reports version `4.3.0`. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary>…7c98fe6 -
Expose the Admin startup browser preference (#1091)
Unverified signature## Problem The Admin startup browser preference bypassed FCC's settings system. Managed configuration could not control it, and the Admin UI did not expose it. ## Changes | Before | After | | --- | --- | | The launcher read `FCC_OPEN_BROWSER` directly from the process environment. | The launcher reads the typed `open_admin_browser` setting. | | The startup browser preference was absent from the Admin UI. | Runtime settings expose an **Open Admin on Startup** toggle. | | Managed configuration could not disable browser launch. | Admin changes persist for the next server launch without restarting the running proxy. | | Browser launch defaulted on through launcher fallback logic. | Browser launch defaults on through the canonical Settings and template contract. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR exposes the Admin startup browser preference through the normal settings flow. The main changes are: - Added `FCC_OPEN_BROWSER` as…8e44b86
-
Remove the native Anthropic provider transport (#1067)
Unverified signature## Problem Ollama and llama.cpp still used a parallel native Anthropic transport after the other providers moved to OpenAI Chat. That kept duplicate request, SSE, recovery, model-list, and server-tool policy machinery alive. ## Changes | Before | After | | --- | --- | | Ollama and llama.cpp streamed through provider-specific Anthropic `/messages` adapters. | Ollama and llama.cpp use the shared OpenAI Chat transport. | | Native request serialization, SSE normalization, error mapping, and recovery remained beside the OpenAI path. | Native-only machinery is removed and all providers share one transport lifecycle. | | Routed models carried a capability object solely to permit native server-tool passthrough. | Routing carries only route decisions; FCC handles forced server tools locally and rejects lossy passthrough. | | Ollama discovery used a separate `/api/tags` parser and rejected `/v1` configuration. | Ollama discovery uses `/v1/models` and accepts either root or `/v1` base URLs. | …9a1b3fc
-
Make response stream lifetimes explicit (#1060)
Unverified signature## Problem Client disconnects and response-start send failures could abandon a prefetched provider stream and its generation lease. Re-yielding iterators and response-proxy middleware left no owner that closed the complete body chain before runtime release. ## Changes | Before | After | | --- | --- | | Starlette body iteration indirectly owned stream cleanup and lease release. | One FCC streaming response surrounds the real ASGI send, closes the body transitively, then releases the lease exactly once. | | The prefetched first-frame generator could not close its tail before replay began. | An explicit closeable replay iterator owns the prefetched tail in every commit state. | | Tracing, execution, Responses conversion, and native transport transforms re-yielded inputs without closing them. | Every retained transform closes its direct input; redundant transport wrappers are removed while provider construction failures remain deferred. | | Function-style correlation middleware proxied …4aecccf -
Use installed metadata as the single package version source (#1051)
Unverified signature## Problem FCC runtime surfaces reported stale, unrelated versions, and users could not inspect the installed FCC version without starting the server or scaffolding configuration. ## Changes | Before | After | | --- | --- | | FastAPI/OpenAPI and the web-tools user agent duplicated stale release literals. | Every FCC runtime surface reads installed distribution metadata through one `core.version` owner. | | FCC-owned commands had no side-effect-free version query. | `fcc-server`, `free-claude-code`, and `fcc-init` print the installed version whenever `--version` is present, before any configuration or process work. | | Wrapped Claude and Codex argument handling was adjacent to FCC command behavior. | Claude and Codex launchers remain transparent and pass `--version` to their wrapped clients unchanged. | | A source-only checkout had no explicit fallback contract. | Missing distribution metadata reports `0+unknown`, while malformed installed metadata still fails visibly. | | Version be…4ab63bd -
Make provider capabilities semantic and typed (#1047)
Unverified signature## Problem Provider metadata mixed descriptive strings and transport-family names with product policy. The Messages API had to know provider implementation details to decide server-tool behavior, while locality and thinking metadata had ambiguous owners. ## Changes | Before | After | | --- | --- | | Provider descriptors exposed transport names and untyped capability strings. | Provider descriptors expose an immutable semantic value containing only locality and server-tool passthrough. | | The Messages handler derived provider sets from transport families. | `ResolvedModel` carries catalog capabilities and the handler asks the resolved semantic policy. | | Discovery, Admin, and smoke selection inferred locality from credentials or string membership. | Discovery, Admin, and smoke selection read the catalog-owned `local` capability. | | Provider-wide thinking strings competed with discovered model metadata. | `ProviderModelInfo.supports_thinking` remains the sole per-model thinking aut…2f1cc5a -
Canonicalize provider failure and retry ownership (#1046)
Unverified signature## Problem Provider SDK classification, retry policy, canonical failures, and downstream wire errors shared exception types across layers. That blurred ownership and let cleanup or provisional Responses tool failures mask the real provider diagnostic. ## Changes | Before | After | | --- | --- | | Provider failures carried Anthropic wire types and core code classified OpenAI/httpx errors. | Protocol-neutral `ExecutionFailure` values cross layers, providers classify SDK errors, and protocol packages map wire types. | | Provider adapters could author terminal wire events. | The HTTP commit boundary selects non-2xx JSON or a protocol terminal event with one ingress request ID. | | Retry policy and diagnostic handling were spread across core and provider modules. | Providers own the unchanged retry budgets while neutral core utilities own bounded credential redaction. | | Stream cleanup could replace an already-mapped provider failure. | Cleanup records safe metadata and preserves the ca…db883b3 -
Introduce a typed application boundary for provider execution (#1045)
Unverified signature## Problem The HTTP adapter owned model routing, provider execution, and runtime-facing contracts, so API handlers depended on provider implementation types. Provider preflight also discovered private request builders dynamically, obscuring the boundary that must fail before streaming begins. ## Changes | Before | After | | --- | --- | | `api/` owned model routing and shared provider execution. | `application/` owns routing and a settings-independent `ProviderExecutor`. | | API handlers accepted `BaseProvider` callbacks. | API handlers consume the narrow structural `ProviderPort`. | | `BaseProvider` discovered `_build_request_body` dynamically. | Both transport families implement explicit abstract preflight, with LM Studio composing context validation. | | Request leases, task control, and provider model metadata had adapter/provider owners. | Application-owned ports and immutable values define those cross-package contracts. | | Boundary direction was implicit. | Architecture contra…d29db6e -
Move protocol models to their protocol owners (#1044)
Unverified signature## Problem Anthropic Messages and OpenAI Responses wire models lived under the inbound API adapter. Neutral protocol and provider code therefore duck-typed requests, obscuring ownership and weakening dependency boundaries. ## Changes | Before | After | | --- | --- | | The API package owned Anthropic and Responses protocol models. | Each protocol package owns and publicly exports its wire models. | | Core and provider request paths accepted `Any` and probed known fields with `getattr()`. | Core, transports, and providers consume concrete `MessagesRequest` values. | | Responses conversion and streaming received a dumped request mapping. | Responses conversion and streaming receive one concrete `OpenAIResponsesRequest`. | | Anthropic request snapshots lived in generic tracing code. | Anthropic request snapshots live with the protocol while generic tracing stays protocol-independent. | | Protocol tests and provider request doubles reflected the old API ownership. | Protocol tests live u…7b3c6de -
Replace global runtime resources with explicit ownership (#1042)
Unverified signature## Problem Provider, messaging, and transcription resources relied on process-global state, leaving replacement, cancellation, and shutdown ownership ambiguous. Separate server lifetimes could share event-loop-bound resources or retain failed cleanup work. ## Changes | Before | After | | --- | --- | | Provider clients found limiters through global singleton and scoped registries. | Each provider instance receives and owns one explicitly constructed limiter. | | Messaging queues and voice pipelines relied on singleton or module-global state. | Each platform owns its limiter and outbox, while the application owns one injected transcriber. | | Messaging shutdown mixed ingress, active work, delivery, and SDK cleanup. | Application shutdown quiesces ingress, drains work, closes delivery, then releases transcription and providers. | | Cancelled or failed provider cleanup could be forgotten or treated as complete. | The provider manager retains shielded generation and unpublished-runtime c…4294178
-
Establish single-owner runtime with stream-safe provider hot swaps (#1036)
Unverified signature## Problem Provider runtime ownership was split between lifecycle code and mutable FastAPI state, so Admin replacements could leak the new runtime, double-close the old runtime, or close providers still serving active streams. The API package also owned concrete process composition, obscuring subsystem boundaries. ## Changes | Before | After | | --- | --- | | FastAPI routes inspected several concrete `app.state` resources. | FastAPI receives one explicit `ApiServices` boundary and stores only `app.state.services`. | | Admin Apply persisted config and directly replaced one runtime reference. | Admin Apply validates a candidate, commits atomically, and publishes it through the single runtime owner. | | Provider replacement could close clients used by active streams. | Generation leases retain old providers until each streaming or non-streaming response finishes. | | Provider generations owned discovery state and model metadata. | `ProviderRuntimeManager` owns one application-lifetime …0602b26 -
Restore protocol-correct provider errors without client retry loops (#1033)
Unverified signature## Problem Provider failures before streaming were converted to HTTP 200 SSE errors, masking typed upstream statuses as malformed proxy responses. This regressed #1026's error visibility while solving client retry loops; fixes #1031. ## Changes | Before | After | | --- | --- | | Pre-start Messages failures returned HTTP 200 SSE errors. | Pre-start Messages failures return typed non-2xx JSON with `x-should-retry: false`. | | Non-streaming Messages could preserve partial content after an internal stream error. | Non-streaming Messages discard partial content and return the mapped Anthropic error. | | Post-start failures could synthesize a successful stop lifecycle. | Post-start failures emit protocol-native terminal errors without a fake success stop. | | Responses failures lacked consistent retry ownership and correlation. | Responses failures retain typed envelopes, retry suppression, response IDs, and request IDs. | | Request IDs were generated independently across layers. | One in…fcd6f91
-
Move runtime packages under src namespace (#1029)
Unverified signature## Problem Runtime modules were published as generic top-level packages like `api`, `cli`, and `providers`. That shape is fragile for PyPI packaging and weakens explicit ownership boundaries. ## Changes | Before | After | | --- | --- | | Runtime code lived in root-level packages. | Runtime code lives under `src/free_claude_code/`. | | Console scripts targeted top-level modules. | Console scripts target namespaced modules. | | Tests and smoke helpers imported old package roots. | Tests and smoke helpers import `free_claude_code.*`. | | Packaging listed six root packages. | Packaging builds the single namespaced package. | | Contracts allowed old root package directories. | Contracts require the src namespace and reject old root imports. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR moves the runtime packages into the `src/free_claude_code` namespace. The main changes are: - Console scripts now point to `free_claude_code.*` entrypoi…0d0f0f9 -
Preserve messaging transcript on stop
Unverified signature64dfa67 -
Fix pre-start stream failures returning HTTP 200 (#1026)
Unverified signature## Problem Provider streams could commit HTTP 200 before an upstream-backed first SSE frame was available. When setup or retry failed before usable stream output, Claude and Codex saw a successful but broken stream instead of a retryable non-200 error. ## Changes | Before | After | | --- | --- | | API egress returned `StreamingResponse` before probing the provider iterator. | API egress waits for the first chunk before committing success headers. | | Pre-start provider failures became synthetic SSE success streams. | Pre-start provider failures raise typed errors and return Anthropic or OpenAI JSON with non-200 status. | | Post-start unexpected stream failures could truncate protocol output. | Post-start failures emit terminal Anthropic error or Responses `response.failed` frames where possible. | | Provider tests expected pre-start final failures as SSE tails. | Provider tests assert typed pre-start errors and preserve midstream and tool-salvage behavior. | <!-- greptile_comment -…8ace4ff
-
Use batch delete boundary for messaging (#996)
Unverified signature## Problem Messaging cleanup had two public queued delete paths. Command code could loop single-message deletes and bypass Telegram batch deletion. ## Changes | Before | After | | --- | --- | | Workflow code could call `queue_delete_message` or `queue_delete_messages`. | Workflow code calls only `queue_delete_messages`. | | Telegram `/clear` cleanup used one API request per message. | Telegram `/clear` cleanup uses `deleteMessages` in chunks of 100. | | The outbox dedupe key used Python process hashing. | The outbox dedupe key uses a stable SHA-based digest. | | Voice and smoke cleanup depended on the single-delete queue API. | Voice and smoke cleanup pass one-item delete lists. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR moves messaging cleanup to a list-based delete boundary. The main changes are: - `/clear` now sends collected message IDs through `queue_delete_messages`. - Telegram deletion uses `deleteMessages` in 100-messag…e6c728d -
add telegram proxy support (#988)
debil746429Unverified signaturec9416c1 -
Update GLM 5.2 model references
Unverified signature6a00687
-
Add SambaNova Cloud provider (#990)
newmemories360Unverified signature6e67056