Commit History
-
feat: theme dashboard charts and expose admin UI on HF Spaces
shinmentakezo078bdd0d7
-
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
-
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
-
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
-
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 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
-
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 -
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
-
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
-
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
-
add telegram proxy support (#988)
debil746429Unverified signaturec9416c1 -
Update GLM 5.2 model references
Unverified signature6a00687
-
Add SambaNova Cloud provider (#990)
newmemories360Unverified signature6e67056 -
Add GitHub Models provider (#989)
Unverified signature## Problem FCC does not expose GitHub Models, so users with GitHub Models access cannot route Claude, Codex, or messaging prompts through GitHub's hosted model catalog. ## Changes | Before | After | | --- | --- | | Provider catalog did not include GitHub Models. | Provider catalog includes `github_models` with token, proxy, admin, smoke, and model picker wiring. | | Requests could not target GitHub Models inference. | `providers/github_models` routes OpenAI-chat requests to `https://models.github.ai/inference`. | | Model discovery assumed provider `/models` compatibility. | GitHub Models discovery uses the catalog API and advertises stream/tool-capable models. | | OpenAI-chat transport could not set provider default headers. | OpenAI-chat transport accepts provider-owned default headers. | | Docs and templates omitted GitHub Models setup. | README, `.env.example`, and architecture docs document GitHub Models setup and ownership. | <!-- greptile_comment --> <details open><summary><…9639c27 -
Add Cohere provider (#986)
Unverified signature## Problem FCC does not expose Cohere's OpenAI-compatible chat models, so users with Cohere keys cannot route Claude, Codex, or messaging prompts through Cohere. ## Changes | Before | After | | --- | --- | | Provider catalog did not include Cohere. | Provider catalog includes Cohere with `COHERE_API_KEY`, `COHERE_PROXY`, admin status, and smoke model wiring. | | Requests could not target Cohere's compatibility API. | `providers/cohere` routes OpenAI-chat requests to Cohere's compatibility API with Cohere-specific request policy. | | Docs and templates omitted Cohere setup. | README, `.env.example`, and architecture docs document Cohere setup and ownership. | | Cohere behavior had no regression coverage. | Provider, runtime, admin, config, smoke, and catalog tests cover Cohere integration. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR adds Cohere as a new OpenAI-compatible chat provider. The main changes are: - Cohere provider meta…005c1c5 -
Add Hugging Face inference provider (#985)
Unverified signature## Problem FCC did not expose Hugging Face Inference Providers as a selectable backend. Voice transcription also used the legacy `HF_TOKEN` setting instead of the canonical Hugging Face API key. ## Changes | Before | After | | --- | --- | | Hugging Face models could not be selected through provider-prefixed routing. | Hugging Face routes through a thin OpenAI-chat provider using `huggingface/<model>`. | | Provider credentials did not include `HUGGINGFACE_API_KEY`. | Admin config, settings, smoke config, and docs use `HUGGINGFACE_API_KEY`. | | `HF_TOKEN` remained a voice-only config key. | Owned dotenv files migrate `HF_TOKEN` to `HUGGINGFACE_API_KEY`, while explicit `FCC_ENV_FILE` users get a warning. | | Version metadata stayed on `2.6.0`. | Version metadata moves to `3.0.0` with a refreshed lockfile. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR adds Hugging Face Inference Providers as a selectable backend. The main changes are: …1e87e3c -
Remove legacy future annotation imports (#982)
Unverified signature## Problem Python 3.14 provides native lazy annotations, but the codebase still relied on legacy future annotation imports. Those imports also made type-only import cycles easier to hide instead of fixing ownership boundaries. ## Changes | Before | After | | --- | --- | | Python files used `from __future__ import annotations`. | Python files rely on Python 3.14 native lazy annotations. | | Some runtime modules used `TYPE_CHECKING` or local imports for required dependencies. | Runtime modules use top-level owner-module imports with explicit boundaries. | | Local and GitHub guardrails only rejected type ignore suppressions. | Local and GitHub guardrails reject type ignore suppressions and legacy future annotation imports. | | Agent docs only documented the no-type-ignore rule. | Agent docs document the Python 3.14 annotation and import-boundary rules. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR moves the codebase to Python 3.14 nat…d7e53a2
-
Fix Cloudflare Workers AI transport (#971)
Unverified signature058c72a
-
Add Cloudflare provider (#933)
Unverified signature7228a14
-
Refactor admin config into catalog-driven package (#926)
Unverified signature## Problem Admin config was a single responsibility hub with manually duplicated provider metadata. Provider labels, fields, template loading, validation, persistence, and status lived in one place. ## Changes | Before | After | | --- | --- | | Admin config lived in one large `api/admin_config.py` module. | Admin config lives in package modules for manifest, sources, values, validation, persistence, and status. | | Provider admin fields and UI labels were manually duplicated. | Provider admin fields and display names derive from `PROVIDER_CATALOG` with admin-only help overrides. | | `fcc-init` and Admin UI loaded `.env.example` separately. | `fcc-init` and Admin UI use shared `config.env_template` loading. | | Architecture docs pointed to the old admin config module. | Architecture docs describe the package owners and catalog-driven provider manifest. | <!-- greptile_comment --> <details open><summary><h3>Greptile Summary</h3></summary> This PR refactors admin configuration into …037b69a
-
Fix live provider smoke defaults
Update live smoke model defaults for NIM, OpenRouter, and Gemini; normalize tool-call indexes; downgrade DeepSeek forced tool_choice; and add coverage for the provider smoke fixes.e590cac
-
Add Cereberas Provider
29a2505 -
Add Groq Provider
37256a9 -
Add Gemini Provider
31203ea
-
feat(admin): add Fireworks API key and proxy to admin manifest
Registers FIREWORKS_API_KEY / FIREWORKS_PROXY in api/admin_config FIELDS so the UI can set credentials and provider status stays accurate. Adds admin apply test and contract guards linking PROVIDER_CATALOG to FIELD_BY_KEY; updates .env.example.54fb8c5
-
Admin UX refactor, runtime fixes, and startup logging (#472)
Unverified signature## Summary - Refactors the admin interface into focused views and simplifies the header (removes noisy status labels; hides managed-source labels where appropriate). - Fixes Claude runtime settings handling, reduces Z.ai base URL leakage in the admin UI, and streamlines API startup logging. - Updates configuration and catalog behavior (including `.env.example` / README), and expands automated tests around admin, app lifespan, and config/registry behavior. ## Test plan - [ ] `uv run ruff format`, `uv run ruff check`, `uv run ty check`, `uv run pytest` - [ ] Smoke the admin UI: navigation between views, settings save/load, no sensitive URL leakage in the UI - [ ] Confirm API startup logs are readable and not overly verbose in normal operationd7d427d -
Improve admin UX settings (#471)
Unverified signature## Summary - split the admin UI into Providers, Model Config, and Messaging views - remove generated env, diagnostics, smoke, managed-label, and fixed cloud/runtime settings from the visible admin UX - make Z.ai base URL, Claude workspace, and Claude CLI binary fixed app-level behavior instead of managed env fields ## Verification - uv run ruff format - uv run ruff check - uv run ty check - uv run pytestb9b8d0d
-
Use canonical FCC server log path
dbf6d83 -
Update default config and workspace paths
c15dc87
-
Improve admin UI setup flow
e3813b4 -
Initial admin impl
401da8a