* refactor: remove isPro from database schema
- Remove isPro field from User type
- Remove isPro parsing from OAuth login
- Remove isPro from user API response
- isPro is now fetched purely client-side from HuggingFace public API
* fix: keep isPro as null on fetch error to avoid showing wrong badge
feat: add PRO badge and credits modal for HuggingChat (#2048)
* feat: add PRO badge and credits modal for HuggingChat
- Add isPro field to User type and persist from OAuth login
- Fetch fresh isPro status from HuggingFace public API on page load
- Display "Get PRO" button for non-PRO users in sidebar
- Display "PRO" badge for PRO users in sidebar
- Update SubscribeModal to show "Purchase Credits" for PRO users
- Add IconPro component for gradient sparkle icon
* feat: improve SubscribeModal UI for PRO users
- Use IconDazzled with yellow-orange-red gradient for "Out of Credits"
- Use IconPro with pink-green-yellow gradient for "Upgrade Required"
- Update credits message to mention HF services and Inference Providers
* Add voice transcription feature to chat
Introduces voice recording and transcription in the chat window using Whisper models. Adds new components for voice recording and audio waveform visualization, updates feature flags and environment variables, and implements a server API endpoint for audio transcription.
* Fix frequencyData reactivity in VoiceRecorder
Replaces in-place mutation of frequencyData with assignment of a new Uint8Array to ensure Svelte reactivity in the voice visualization.
* Improve AudioWaveform visualization and responsiveness
Refactors AudioWaveform.svelte to use a timeline-based amplitude visualization with dynamic pill count based on container width, smoother animation, and responsive resizing. Updates VoiceRecorder.svelte to remove fixed pillCount and adjust maxHeight for better appearance. These changes provide a more accurate and visually appealing waveform display.
* Improve audio waveform and voice recorder UI
Reduced pill width and gap in AudioWavef…
* Add billing organization selection
Introduces support for selecting a billing organization for inference requests in HuggingChat. Adds a new billing section in application settings, updates user settings and API to store and validate the selected organization, and ensures requests are billed to the chosen organization by sending the X-HF-Bill-To header. Also updates environment and chart files to include the new OpenID scope required for billing.
* Update +page.svelte
* Remove billingOrganization from default settings
* Fix user settings creation and update test for findUser
The test for updateUser now passes a URL to findUser to match the updated function signature. Also, the updateUser function now inserts the full DEFAULT_SETTINGS object when creating default user settings, ensuring billingOrganization is included.
Update conversation pagination and response format
* Update ServerCard.svelte
feat(mcp): add Model Context Protocol integration with tool support
Improve MCP tools caching and server selection logic
Replaces single-entry MCP tools cache with a multi-keyed cache based on server configuration, improving cache accuracy for different server sets. Refactors server selection logic in runMcpFlow to better handle custom server lists and selected server names. Removes MCP flow from generate.ts, streamlining text generation logic.
* Add OAuth authentication for MCP servers
Introduces browser-based OAuth flow for MCP servers, including new auth helpers, localStorage management, and UI actions for authentication and sign-out. Server cards now support authentication, and enabled servers include persisted auth headers for API requests. Adds callback handler and route for OAuth completion.
* Add server authentication status and UI indicators
Introduces an 'authRequired' property to MCPServer and health check responses to indicate when authenti…
* redirect to the convo
* backend redirect to the convo
* fix: fetch url logs
* server side redirect
* require a query only for the get
* fix error type
* fix: fetch url logs
---------
Co-authored-by: rtrm <remy.trompier@gmail.com>
* Add model refresh API and refactor model loading
Introduces a POST /models/refresh endpoint for admins to trigger a model refresh and receive a summary of changes. Refactors model loading logic in models.ts to support dynamic refresh, exposes refreshModels and lastModelRefreshSummary, and adds a test script (test-refresh.mjs) to verify refresh functionality. Minor code cleanup and improved override handling included.
* Delete test-refresh.mjs
Removed several unused dependencies including @gradio/client and fs-extra, and added mime-types to the project. Also updated import in groups/misc.ts to use mime-types and adjusted vite.config.ts accordingly.
Eliminated all references to oldModels, including its import, configuration, and usage in model selection logic and API routes. This simplifies model management and removes unnecessary legacy code.
* BREAKING? Remove overflow-hidden from message info container
The overflow-hidden class was removed from the message info container div to allow content to overflow as needed. This may improve the display of message metadata or related elements.
* Add subscribe modal and improve error handling
Introduces a SubscribeModal component to prompt users to upgrade when hitting message limits, shown on 402 errors in conversation pages. Enhances error propagation and handling in router and endpoint logic, preserving HTTP status codes and error messages, and updates types to support status codes in message updates. Also includes minor UI improvements to Toast and refines error extraction and logging throughout the routing flow.
* Sanitize and improve error handling in router endpoints
Introduces functions to sanitize error messages before sending them to clients, preventing leakage of provider details. Differentiates between policy errors (e.g., authorization, payment) and transient errors…
* refactor: remove tokenizer-related functionality and dependencies
- Removed tokenizer dependencies from package.json.
- Deleted TokensCounter component and its usages across the application.
- Updated model configurations to exclude tokenizer properties.
- Refactored model processing logic to support only OpenAI-compatible endpoints.
- Adjusted API responses to omit tokenizer information.
- Cleaned up related utility functions and imports.
* Remove web search functionality and related components
- Deleted endpoints for various web search APIs (serpApi, serpStack, serper, webLocal, youApi).
- Removed generateQuery function and its usage in search.
- Eliminated web search related types and interfaces from the codebase.
- Updated Assistant and Conversation types to remove references to web search and embedding models.
- Cleaned up related utility functions and message updates for web search.
- Adjusted API routes and components to reflect the removal of web search features.
- Updated…
* feat(API): refactor API with Elysia
* feat: initial elysia setup
* feat: replace conv/[id] load function with universal
* fix: delete v1 catchall
* wip
* fix: response type
* fix: add cors
* feat: more routes in tools & assistants
* refacto: use normal svelte fetch in `/assistant/[assistantId]`
* refacto: use normal svelte fetch in `conversation/[id]`
* feat: use universal load function for `tools/[toolId]`
* wip: removing more server load function stuff
* feat: more routes to universal load functions
* feat: more routes to universal
* refactor: move tools loading to API endpoint
* refactor(api): implement tools search API endpoint and move load function
* fix: types on tool search
* refactor: update assistant route and remove redundant page load function
* refactor(api): move assistants page load function to api call
* refactor(settings): remove waterfall loading
* refactor: main load function
* fix: types
* feat: improve fetchJSON to handle empty responses
* …
Revert "refactor: new API & universal load functions (#1743)"
* feat(API): refactor API with Elysia
* feat: initial elysia setup
* feat: replace conv/[id] load function with universal
* fix: delete v1 catchall
* wip
* fix: response type
* fix: add cors
* feat: more routes in tools & assistants
* refacto: use normal svelte fetch in `/assistant/[assistantId]`
* refacto: use normal svelte fetch in `conversation/[id]`
* feat: use universal load function for `tools/[toolId]`
* wip: removing more server load function stuff
* feat: more routes to universal load functions
* feat: more routes to universal
* refactor: move tools loading to API endpoint
* refactor(api): implement tools search API endpoint and move load function
* fix: types on tool search
* refactor: update assistant route and remove redundant page load function
* refactor(api): move assistants page load function to api call
* refactor(settings): remove waterfall loading
* refactor: main load function
* fix: types
* feat: improve fetchJSON to handle empty responses
* …