Moved tool and multimodal support icons out of a nested flex container for cleaner layout and removed duplicate code. This improves readability and maintainability of the model badges section.
* Adjust button and menu item sizes for better UI consistency
Updated various button and dropdown menu item classes in ChatInput.svelte and ChatWindow.svelte to use larger default sizes (size-8, h-9) with responsive adjustments for small screens (sm:size-7, sm:h-8). This improves visual consistency and touch target accessibility across the chat interface.
* Replace custom SVG icons with Lucide icons
Swapped out CarbonAdd and custom SVG icons for Lucide's IconPlus and IconArrowUp in ChatInput and ChatWindow components to standardize icon usage and improve maintainability.
* Update model list styles for responsiveness
Replaced fixed height/width classes with responsive 'size' utility classes for images and icons. Adjusted text size for model names on small screens to improve mobile usability.
* Add swipe gesture support to MobileNav
Introduces swipe gesture detection for opening and closing the mobile navigation drawer. Swiping right from the left edge opens the nav, and swiping l…
Replaces CarbonTools and related Carbon icons with Lucide equivalents throughout the UI, updating imports and usage in Svelte components. Updates Hugging Face organization avatar URLs to the new /api/avatars/{org} endpoint in both frontend and backend code. Adds new models to dev and prod YAML configs, and improves the models page layout and filtering. Also updates dependencies to include @iconify-json/lucide and the latest @sinclair/typebox.
* 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…
Adds a gradient highlight for the router (Omni) model tile in the models page, updates its description in both backend and UI, and refines active model border styling for better theme support. Also tweaks the chat input dropdown hover style for consistency.
* Add custom scrollbar class to Modal component
Applied the 'scrollbar-custom' class to the Modal's main container to enable custom scrollbar styling. This improves the appearance and consistency of scrollbars within modals.
* Add support for loading attachments from URLs
Implements the ability to load file attachments via URL parameters using a new utility (loadAttachmentsFromUrls) and a server-side proxy endpoint (/api/fetch-url) to securely fetch remote files. Updates chat and model pages to handle 'attachments' query parameters, injects file content into user messages, and improves multimodal message preparation. Also includes minor UI adjustments for file display and refactors Plausible analytics script initialization.
* Block redirects in fetch-url API endpoint
Replace history.replaceState with SvelteKit replaceState
Refactored usage of history.replaceState to use the SvelteKit-provided replaceState function in both +page.svelte files. This ensures better integration with SvelteKit's navigation and state management.
Changed the HuggingChat info link to point to the inference providers documentation and updated the models header to include a link to Inference Providers when HuggingChat is enabled.
* Add custom scrollbar class to Modal component
Applied the 'scrollbar-custom' class to the Modal's main container to enable custom scrollbar styling. This improves the appearance and consistency of scrollbars within modals.
* Add support for loading attachments from URLs
Implements the ability to load file attachments via URL parameters using a new utility (loadAttachmentsFromUrls) and a server-side proxy endpoint (/api/fetch-url) to securely fetch remote files. Updates chat and model pages to handle 'attachments' query parameters, injects file content into user messages, and improves multimodal message preparation. Also includes minor UI adjustments for file display and refactors Plausible analytics script initialization.
* Add support for 'prompt' URL param and draft binding
Introduces a utility to sanitize URL parameters and updates chat window logic to use a 'draft' state instead of 'message'. Both main and model-specific chat pages now support pre-filling the chat input from a 'prompt' URL parameter, and clear the parameter after use. This improves UX for deep-linking and sharing prompts.
* Sanitize URL parameters in model page
Added usage of sanitizeUrlParam for 'q' and 'prompt' URL parameters in the model page to prevent unsafe input. Wrapped parameter handling in a try-catch block to improve error handling and log failures.
Changed the external link in the models page from a discussion to the Hugging Face inference models page. Also updated the link's text color and hover styles for better visibility in both light and dark modes.
* 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…
refactor: new API & universal load functions (pt. 2) (#1847)
* 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
* …
* work on hf inference endpoint
* working tools
* fix: debug tool
* feat: working tools with new endpoint type
* feat: move config to HfInference
* wip
* fix: hf inference endpoint
* refactor: rename endpoint
* fix: rendering
* feat: working tools on every supported model
* fix: multimodal
* refactor: rename endpoint type
* refactor: base URL
* fix: prevent simultaneous provider and baseURL usage
* fix: disable tools on qwen 2.5 vl
* feat: make sure json is correctly formatted
* feat(config): wip, make config controllable from DB, public side for now
* fix: build
* feat(config): add config manager env var toggle
* wip: make backend config use config manager
* fix: typechecks
* fix: circular import
* refactor: init hook sveltekit
* fix: disable config manager during tests
* refactor: use enum for semaphore, move delete from auto after 60s to separate `deleteAt` field
* feat: config manager checks for updates on requests
* fix: config script exit
* fix: remove top-level awaits
* fix: script await
* feat: filter config keys based on public environment variables for more security
* fix: change import to type for public environment variables
* Initial work on function calling
* wip
* Add websearch as a tool
* lint
* smol
* Move tools to their own files
* directly answer check
* Add text2img tool
* group tool calls together
* show retry even if no message
* fix trailing urls
* Add image popup
* format
* wip
* clean-up
* better loading indicator
* text colors
* extra example to summarize
* switch default model
* Add fetchUrl tool
* wip
* Add latest gradio
* fix types
* version bump sharp
* Basic tools menu
* working menu
* fix menu positioning
* deps fix
* add deps
* cleanup
* more cleanup
* cleanup
* package cleanups
* moar cleanup
* ui update
* Update ChatMessage.svelte
* upgrade gradio dep
* lint
* refactor and pass results to cohere
* feat: code interpreter tool
* fix: add e2b dependency
* feat: working TGI endpoint with tool results
* feat: allow image model to expand to 90dvw
* fix: dont block on title gen
* bump sharp
* misc cleanup
* fix url fetcher, adjust tool typing
*…
* Add healthcheck route
* Add prom client with basic metrics
* wip: serve metrics on a different port
* exclude server from tsconfig
* latest
* refacto(all): use class & singleton
* refacto(all): use class & singleton
* refacto(all): add request logs
* Make all the env vars dynamic (#1092)
* Add truncate to task model (#1090)
* retry text area height (#1091)
* Make all the env vars dynamic
* only check for db at runtime
* remove secret from build step
* improve dockerfile
* Wrap db in singleton
* add .env.local to dockerignore
* changes to dockerfile
* lint
* aborted generations
* move collections build check
* Use a single dockerfile
* lint
* fixes
* lint
* don't return db during building
* remove dev
---------
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
* refacto(all): update default metrics port
* fix recursion error
* add version check
* revert vite preview
* Move request logs to debug level and add an env var to filter by log level in d…
Support Gemini 1.5 Pro from Vertex AI (#1041)
Luke+1: nsarrazin
Unverified signature
d6a02c6
* fix support for gemini on vertex ai
- use native messages api
- provide full content
- hide "Continue" button
- support "safety settings"
- fix confusion in readme
* respect new lines in model description
* ignore google service accounts matching `gcp-*.json`
* type checks
* copy service account, if exists, to container
* narrow response type
* fix streaming generation
---------
Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
* Direct model page
* Remove auto redirect
* fix thumbnail
* css warning
* change url for models
* instantSet from settings
* Get rid of redirect
* thumbnail
* also link from /models
* use public app color
---------
Co-authored-by: Victor Mustar <victor.mustar@gmail.com>