Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
b9adc00
chore: update webui build output
allozaur Jan 7, 2026
98bce85
refactor: Cleanup
allozaur Jan 7, 2026
d89ada8
chore: update webui build output
allozaur Jan 7, 2026
56b34bf
refactor: Collapsible Content Block & small fixes
allozaur Jan 8, 2026
b0ba550
refactor: Cleanup
allozaur Jan 8, 2026
223c633
refactor: Cleanup
allozaur Jan 8, 2026
06febe0
fix: Collapsible box trigger
allozaur Jan 8, 2026
089f382
feat: Add TruncatedText component
allozaur Jan 8, 2026
bf2a793
refactor: Cleanup
allozaur Jan 8, 2026
ddbb7dc
fix: Remove redundant CSS class
allozaur Jan 8, 2026
835c06e
refactor: Cleanup
allozaur Jan 8, 2026
dfd3031
refactor: Componentize McpServerCard
allozaur Jan 8, 2026
6f77504
refactor: Types
allozaur Jan 8, 2026
e3ca595
chore: update webui build output
allozaur Jan 8, 2026
2c0add6
Merge remote-tracking branch 'origin/allozaur/mcp-mvp' into allozaur/…
allozaur Jan 8, 2026
d000d84
webui: fix redirect to root ignoring base path
ServeurpersoCom Jan 8, 2026
74b119e
webui: prevent mobile dropdown immediate close on synthetic click
ServeurpersoCom Jan 8, 2026
b7288a4
webui: enable streaming of tool call arguments
ServeurpersoCom Jan 10, 2026
a02acca
fix: reset tool call state between turns
ServeurpersoCom Jan 10, 2026
1441481
refactor: Cleanup
allozaur Jan 12, 2026
01dfe0e
chore: update webui build output
allozaur Jan 12, 2026
b5226eb
Merge origin/allozaur/mcp-mvp: enable streaming of tool call arguments
allozaur Jan 12, 2026
c6843d0
chore: update webui build output
allozaur Jan 12, 2026
cead02e
fix: Restore live reactive UI progress for tool calls
allozaur Jan 12, 2026
aa90543
chore: update webui build output
allozaur Jan 12, 2026
528a560
fix: Distinguish streaming vs incomplete tool calls in UI
allozaur Jan 12, 2026
9c53bd4
chore: update webui build output
allozaur Jan 12, 2026
58ab834
refactor: MCP state management + stores/clients relationship
allozaur Jan 12, 2026
a63a421
chore: update webui build output
allozaur Jan 12, 2026
60ef752
refactor: Architecture improvements
allozaur Jan 12, 2026
80e829a
chore: update webui build output
allozaur Jan 12, 2026
a44332b
refactor: DRY
allozaur Jan 12, 2026
392a6dc
chore: update webui build output
allozaur Jan 12, 2026
08c1acd
refactor: KeyValuePairs component
allozaur Jan 12, 2026
0180bec
chore: update webui build output
allozaur Jan 12, 2026
0009c0c
refactor: MCP types and health check
allozaur Jan 12, 2026
5407b2e
feat: MCP connection details WIP
allozaur Jan 12, 2026
120f3c9
chore: update webui build output
allozaur Jan 12, 2026
f89bcb9
feat: MCP Server Details
allozaur Jan 14, 2026
06efeb6
chore: update webui build output
allozaur Jan 14, 2026
b11b32e
chore: update webui build output
allozaur Jan 14, 2026
afdae74
Merge remote-tracking branch 'ggml-org/master' into allozaur/mcp-mvp
allozaur Jan 14, 2026
c1ac8d7
chore: update webui build output
allozaur Jan 14, 2026
39848ee
feat: UI improvement
allozaur Jan 14, 2026
886939c
chore: update webui build output
allozaur Jan 14, 2026
30a585b
feat: UI improvements
allozaur Jan 14, 2026
5417a43
chore: update webui build output
allozaur Jan 15, 2026
cffc3b4
fix: Word wrapping
allozaur Jan 15, 2026
3360f60
webui: fix custom headers persistence in UI
ServeurpersoCom Jan 15, 2026
a377605
webui: fix custom headers persistence in UI (derived)
ServeurpersoCom Jan 15, 2026
a3c2144
feat: persist base64 attachments from tool results
ServeurpersoCom Jan 15, 2026
db37b71
feat: resolve MCP attachment images via rehype plugin
ServeurpersoCom Jan 16, 2026
a1550ab
chore: update webui build output
ServeurpersoCom Jan 16, 2026
2973c64
refactor: inline reasoning with tags, remove fixed thinking field
ServeurpersoCom Jan 16, 2026
78c6380
refactor: remove reasoning after first turn filter
ServeurpersoCom Jan 16, 2026
f093958
chore: update webui build output
ServeurpersoCom Jan 16, 2026
229aba7
fix: strip reasoning content and UI proprietary tags from prompts
ServeurpersoCom Jan 16, 2026
a723238
chore: update webui build output
ServeurpersoCom Jan 16, 2026
9b34177
fix: remove obsolete modality UI tests causing CI failures
ServeurpersoCom Jan 17, 2026
506da17
refactor: eliminate MCP circular dependency
ServeurpersoCom Jan 17, 2026
3572667
chore: update webui build output
ServeurpersoCom Jan 17, 2026
fca7177
fix: ignore assistant attachments (MCP) for modality detection
ServeurpersoCom Jan 17, 2026
5c28b7a
chore: update webui build output
ServeurpersoCom Jan 17, 2026
d8af98f
refactor: remove multimodal validation from model selector
ServeurpersoCom Jan 18, 2026
16a03ee
chore: update webui build output
ServeurpersoCom Jan 18, 2026
d92b621
fix: unify MCP server label logic with simplified fallback
ServeurpersoCom Jan 18, 2026
058929d
fix: acurate tool_response display
ServeurpersoCom Jan 19, 2026
d6dfe8e
chore: update webui build output
ServeurpersoCom Jan 19, 2026
d376839
fix: Missing onModelChange callback running assistant message re-gene…
allozaur Jan 19, 2026
62ed7f1
chore: update webui build output
allozaur Jan 19, 2026
54192b0
feat: Simplify MCP server enabling logic per chat
allozaur Jan 19, 2026
cafb9c0
feat: UI improvements
allozaur Jan 19, 2026
8a95ec3
feat: Improve MCP Server selection UI + lazy load health checks
allozaur Jan 19, 2026
39d0ff4
chore: update webui build output
allozaur Jan 19, 2026
c02e83c
feat: Per-conversation agentic loop state
allozaur Jan 22, 2026
6018f85
feat: Architectural improvements
allozaur Jan 22, 2026
963711c
chore: update webui build output
allozaur Jan 22, 2026
9c391d8
feat: UI improvements
allozaur Jan 23, 2026
3d88d0b
chore: update webui build output
allozaur Jan 23, 2026
8428741
feat: MCP Prompts WIP
allozaur Jan 24, 2026
bd16b61
chore: update webui build output
allozaur Jan 24, 2026
a647edf
fix: Chat Form submission
allozaur Jan 24, 2026
2601bf0
fix: Save draft message in Chat Form when adding System Prompt from n…
allozaur Jan 24, 2026
c39c6ef
fix: System prompt sorting
allozaur Jan 24, 2026
7c4bedd
feat: Improve formatting performance time
allozaur Jan 24, 2026
da9c245
chore: update webui build output
allozaur Jan 24, 2026
172e93d
Merge remote-tracking branch 'ggml-org/master' into allozaur/mcp-mvp
allozaur Jan 24, 2026
9ddc54b
webui: enable vision in agentic tool responses
ServeurpersoCom Jan 24, 2026
85b8da4
fix: resolve TypeScript error in tool response content
ServeurpersoCom Jan 24, 2026
13f7564
refactor: Enums
allozaur Jan 24, 2026
801ef93
refactor: Message Height CSS Variable
allozaur Jan 24, 2026
14911e5
feat: MCP Prompts implementation improvements
allozaur Jan 24, 2026
8bf2d38
chore: update webui build output
allozaur Jan 24, 2026
3d7426c
refactor: Cleanup
allozaur Jan 24, 2026
79e606e
refactor: Constants
allozaur Jan 24, 2026
fc4c392
chore: update webui build output
allozaur Jan 24, 2026
d938994
refactor: Cleanup
allozaur Jan 24, 2026
22d9e64
chore: update webui build output
allozaur Jan 24, 2026
f7b5f62
refactor: Remove unused code
allozaur Jan 24, 2026
ba230c5
refactor: Naming + remove redundant component
allozaur Jan 24, 2026
3722026
refactor: Cleanup
allozaur Jan 24, 2026
2562dc5
chore: update webui build output
allozaur Jan 24, 2026
6daa399
refactor: Naming & Enums
allozaur Jan 24, 2026
5dfc520
refactor: Cleanup
allozaur Jan 24, 2026
1c843b2
chore: update webui build output
allozaur Jan 25, 2026
e7ff091
chore: Add deprecation comment
allozaur Jan 25, 2026
9bcfdc3
refactor: DRY
allozaur Jan 25, 2026
ba39f8c
chore: update webui build output
allozaur Jan 25, 2026
b58b823
refactor: Types
allozaur Jan 25, 2026
202262c
chore: update webui build output
allozaur Jan 25, 2026
fc37712
refactor: Simplify MCP errors
allozaur Jan 25, 2026
9764221
chore: update webui build output
allozaur Jan 25, 2026
7f5284d
refactor: Cleanup
allozaur Jan 25, 2026
ee9efae
refactor: Enums
allozaur Jan 25, 2026
ff0e927
chore: update webui build output
allozaur Jan 25, 2026
5ee232d
refactor: Use store methods
allozaur Jan 26, 2026
176abf3
refactor: Utility function
allozaur Jan 26, 2026
fa0cad2
refactor: Componentize Chat Form Prompt Picker
allozaur Jan 26, 2026
0a66568
chore: update webui build output
allozaur Jan 26, 2026
b7d1de6
refactor: Cleanup
allozaur Jan 26, 2026
c631e26
refactor: Components imports/exports structure & documentation
allozaur Jan 26, 2026
6586ae7
chore: update webui build output
allozaur Jan 26, 2026
ee0f0b2
feat: Improve Code blocks rendering + add auto scroll + improve globa…
allozaur Jan 26, 2026
d675f40
chore: update webui build output
allozaur Jan 26, 2026
e566d66
fix: Scroll issues in DropdownMenuSearchable
allozaur Jan 26, 2026
717a868
feat: Mcp Server Selector
allozaur Jan 26, 2026
7b127db
chore: update webui build output
allozaur Jan 26, 2026
5bf1c86
refactor: Cleanup
allozaur Jan 26, 2026
82f26ad
refactor: Cleanup
allozaur Jan 26, 2026
1d518ca
fix: Wait for all MCP Servers Health Checks to load
allozaur Jan 26, 2026
d444c4a
chore: update webui build output
allozaur Jan 26, 2026
19c32a4
webui: remove unused sessionId, SDK handles it automatically
ServeurpersoCom Jan 26, 2026
5e71525
webui: remove unused sessionId, SDK handles it automatically
ServeurpersoCom Jan 26, 2026
b8221e8
refactor: Utils
allozaur Jan 27, 2026
1b7f576
refactor: Components
allozaur Jan 27, 2026
e35aded
chore: update webui build output
allozaur Jan 27, 2026
b834f16
Merge remote-tracking branch 'origin/allozaur/mcp-mvp' into allozaur/…
allozaur Jan 27, 2026
d4a6815
chore: update webui build output
allozaur Jan 27, 2026
7eff7a3
feat: UI improvements
allozaur Jan 27, 2026
f22e2be
refactor: Use Popover for Chat Form Prompt Picker
allozaur Jan 27, 2026
69682dc
fix: Edit Mode with MCP Prompt in message
allozaur Jan 27, 2026
99d177d
feat: Introduce clipboard types for MCP prompt attachments
allozaur Jan 27, 2026
770f993
feat: Implement clipboard serialization/deserialization for MCP prompts
allozaur Jan 27, 2026
8ca3ffa
feat: Add support for pasting MCP prompt attachments in ChatForm
allozaur Jan 27, 2026
8a8cd78
refactor: Improve styling and overflow handling for ChatMessageMcpPro…
allozaur Jan 27, 2026
6cf823f
refactor: Components
allozaur Jan 27, 2026
357fd8d
chore: update webui build output
allozaur Jan 27, 2026
6b6ebd6
feat: Introduce Chat Actions and Message Edit Contexts
allozaur Jan 27, 2026
cbcd795
refactor: Centralize chat-wide actions in ChatMessages.svelte
allozaur Jan 27, 2026
93992b1
refactor: Encapsulate message editing state and actions in ChatMessag…
allozaur Jan 27, 2026
25df25a
refactor: Adapt message child components to MessageEditContext
allozaur Jan 27, 2026
8421d05
chore: update webui build output
allozaur Jan 27, 2026
80ab2a5
feat: Add cache configuration constants
allozaur Jan 27, 2026
2e2cb3d
feat: Implement generic TTL cache utility
allozaur Jan 27, 2026
2281ac5
refactor: Use TTL cache for model properties in ModelsStore
allozaur Jan 27, 2026
d43895d
feat: Implement inactive chat conversation state cleanup
allozaur Jan 27, 2026
70f96c9
refactor: Remove unused `getChatActionsContext` import
allozaur Jan 27, 2026
f09eeed
chore: update webui build output
allozaur Jan 27, 2026
738ccd8
feat: Add auto-resizing textarea to KeyValuePairs component
allozaur Jan 27, 2026
8219404
feat: Disable server card toggle when in error state
allozaur Jan 27, 2026
6e7b338
feat: Enhance ChatMessageMcpPromptContent display
allozaur Jan 27, 2026
9cce846
chore: update webui build output
allozaur Jan 27, 2026
7ba1b45
refactor: Create shared ActiveConversationStore to avoid circular dep…
allozaur Jan 27, 2026
55e73cd
chore: update webui build output
allozaur Jan 27, 2026
f40b377
refactor: Improves abort signal handling
allozaur Jan 27, 2026
948278d
fix: Missing tool call handling
allozaur Jan 27, 2026
ace0de1
feat: Introduce centralized API fetch utilities
allozaur Jan 27, 2026
f7b7ae4
feat: Introduce BaseClient for common store integration
allozaur Jan 27, 2026
aff13cc
refactor: Go back to simpler Stores + Services architecture
allozaur Jan 27, 2026
fcb7d1f
fix: Sync streaming content to active messages
allozaur Jan 27, 2026
0779dff
chore: update webui build output
allozaur Jan 27, 2026
bdae58c
refactor: Reuse MCP connections for health checks
allozaur Jan 27, 2026
bfbcdc7
fix: Code Preview sandbox
allozaur Jan 28, 2026
85a61a7
refactor: Componentize HorizontalScrollCarousel
allozaur Jan 28, 2026
89166a7
feat: Introduce MCP Resource Types and Service Methods
allozaur Jan 28, 2026
192c920
refactor: Use constants
allozaur Jan 28, 2026
dc2076a
feat: MCP Resources Svelte Store
allozaur Jan 28, 2026
1623547
feat: Integrate Resource Store into Main MCP Store
allozaur Jan 28, 2026
23e4ef7
feat: MCP Resources UI
allozaur Jan 28, 2026
aa7089d
feat: Integrate Resource Attachments into Chat Form UI
allozaur Jan 28, 2026
5a176d1
feat: Chat logic improvements
allozaur Jan 28, 2026
7c9be63
refactor: Refine Chat Message Processing State Display
allozaur Jan 28, 2026
d9e82b7
fix: Linter errors
allozaur Jan 28, 2026
c7b7fc6
chore: update webui build output
allozaur Jan 28, 2026
2aa704b
refactor: Cleanup
allozaur Jan 29, 2026
6793c7d
fix: Checking for capabilities from store
allozaur Jan 29, 2026
7b00b46
chore: update webui build output
allozaur Jan 29, 2026
9d6e210
Merge remote-tracking branch 'ggml-org/master' into allozaur/mcp-mvp
allozaur Jan 29, 2026
406cb1d
Merge remote-tracking branch 'ngxson/xsn/cors_proxy_demo' into alloza…
allozaur Jan 29, 2026
536c686
feat: Integrate with `llama-server` proxy + improve MCP Server Edit Form
allozaur Jan 29, 2026
9447651
chore: update webui build output
allozaur Jan 29, 2026
46c5bca
refactor: Proxy utility
allozaur Jan 29, 2026
e41f70b
refactor: Use CORS Proxy for favicons calls
allozaur Jan 29, 2026
120ada3
chore: update webui build output
allozaur Jan 29, 2026
b872838
webui: adaptive model selector dropdown width
ServeurpersoCom Jan 30, 2026
cd8e574
chore: update webui build output
ServeurpersoCom Jan 30, 2026
1615b1c
fix: responsive MCP server cards for mobile viewports
ServeurpersoCom Jan 31, 2026
1384352
fix: responsive MCP server cards, prioritize server name over version
ServeurpersoCom Jan 31, 2026
556029e
chore: update webui build output
ServeurpersoCom Jan 31, 2026
893dbb0
fix: skip sending image attachments to non-vision backends
ServeurpersoCom Feb 1, 2026
6b7e6f1
chore: update webui build output
ServeurpersoCom Feb 1, 2026
42244c0
fix: also skip image attachments in message history for non-vision ba…
ServeurpersoCom Feb 1, 2026
5a4e4f4
chore: update webui build output
ServeurpersoCom Feb 1, 2026
be96423
feat: render images below attachment markers in tool results
ServeurpersoCom Feb 1, 2026
82f6094
feat: render images inline below attachment markers in tool results
ServeurpersoCom Feb 1, 2026
1ab2e45
chore: update webui build output
ServeurpersoCom Feb 1, 2026
0dbaeaf
webui: incremental MDAST transform caching for streaming performance
ServeurpersoCom Feb 1, 2026
2884ef4
chore: update webui build output
ServeurpersoCom Feb 1, 2026
7953c18
webui: fix UI freeze at high token rates with RAF yield
ServeurpersoCom Feb 1, 2026
965655f
chore: update webui build output
ServeurpersoCom Feb 1, 2026
4642664
webui: remove artificial cache limit, let GC handle cleanup on conver…
ServeurpersoCom Feb 2, 2026
1d2ff05
chore: update webui build output
ServeurpersoCom Feb 2, 2026
4fca9bf
webui: add early exit for unchanged content in markdown processing
ServeurpersoCom Feb 2, 2026
65e8bb6
chore: update webui build output
ServeurpersoCom Feb 2, 2026
ec604a0
Update tools/server/webui/src/lib/components/app/chat/ChatAttachments…
ServeurpersoCom Feb 2, 2026
796fd1a
chore: update webui build output
ServeurpersoCom Feb 2, 2026
4383644
refactor: Cleanup
allozaur Feb 2, 2026
bb4253a
refactor: Cleanup
allozaur Feb 3, 2026
70efc41
refactor: Cleanup
allozaur Feb 3, 2026
16f333e
refactor: Cleanup
allozaur Feb 3, 2026
3120a9f
refactor: Cleanup
allozaur Feb 3, 2026
72ef132
refactor: Cleanup
allozaur Feb 3, 2026
240cab0
refactor: Cleanup
allozaur Feb 3, 2026
28c8df0
refactor: Cleanup
allozaur Feb 3, 2026
7ca66f5
refactor: MarkdownContent props API
allozaur Feb 3, 2026
67e04c9
refactor: Cleanup
allozaur Feb 3, 2026
6489c33
feat: Add `createBase64DataUrl` utility and `MimeTypeApplication.OCTE…
allozaur Feb 3, 2026
983b279
refactor: Use `UrlPrefix` enum for data stream parsing
allozaur Feb 3, 2026
fcae4b3
refactor: Componentize MCP Resource Browser
allozaur Feb 3, 2026
77c96cf
fix: Storybook
allozaur Feb 3, 2026
58e3a18
chore: update webui build output
allozaur Feb 3, 2026
bba8f64
fix: handle MCP WebSocket disconnections with auto-reconnect (SDK pro…
ServeurpersoCom Feb 4, 2026
c451faa
webui: improve when lacking vertical space on mobile with keyboard open
ServeurpersoCom Feb 4, 2026
63db73b
chore: update webui build output
ServeurpersoCom Feb 4, 2026
cc752d0
fix: MCP WebSocket reconnection race conditions
ServeurpersoCom Feb 5, 2026
1785979
chore: update webui build output
ServeurpersoCom Feb 5, 2026
6c7c597
feat: Improve Stop button UI
allozaur Feb 5, 2026
242bc08
feat: Add McpServersSettings to Chat Settings "MCP" section
allozaur Feb 5, 2026
84090b0
refactor: Constants
allozaur Feb 5, 2026
c5fa363
feat: Enable added MCP Server by default
allozaur Feb 5, 2026
5fe03b2
feat: Improve prompt picker keyboard navigation
allozaur Feb 5, 2026
3a64334
feat: Prompt Picker and Prompt Attachment UI/UX improvements
allozaur Feb 6, 2026
315448b
fix: UI improvements
allozaur Feb 6, 2026
0e89fd9
feat: Navigation UI improvements
allozaur Feb 6, 2026
2d8d094
chore: update webui build output
allozaur Feb 6, 2026
9ea5933
fix: Context info fixes & improvements
allozaur Feb 6, 2026
c21bd35
chore: update webui build output
allozaur Feb 6, 2026
3287a41
feat: MCP Resources
allozaur Feb 7, 2026
ccadd26
fix: Syntax highlight for `svelte` and `vue`
allozaur Feb 7, 2026
c50f191
chore: update webui build output
allozaur Feb 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
cmake -B build \
-DCMAKE_BUILD_RPATH="@loader_path" \
-DLLAMA_FATAL_WARNINGS=ON \
-DLLAMA_BUILD_BORINGSSL=ON \
-DLLAMA_CURL=OFF \
-DLLAMA_BORINGSSL=ON \
-DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=OFF \
-DGGML_METAL_SHADER_DEBUG=ON \
Expand Down Expand Up @@ -117,7 +118,8 @@ jobs:
cmake -B build \
-DCMAKE_BUILD_RPATH="@loader_path" \
-DLLAMA_FATAL_WARNINGS=ON \
-DLLAMA_BUILD_BORINGSSL=ON \
-DLLAMA_CURL=OFF \
-DLLAMA_BORINGSSL=ON \
-DGGML_METAL=OFF \
-DGGML_RPC=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
Expand Down Expand Up @@ -1015,7 +1017,7 @@ jobs:
id: cmake_build
run: |
cmake -S . -B build ${{ matrix.defines }} `
-DLLAMA_BUILD_BORINGSSL=ON
-DLLAMA_CURL=OFF -DLLAMA_BORINGSSL=ON
cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}

- name: Add libopenblas.dll
Expand Down Expand Up @@ -1120,7 +1122,8 @@ jobs:
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -S . -B build -G "Ninja Multi-Config" ^
-DLLAMA_BUILD_SERVER=ON ^
-DLLAMA_BUILD_BORINGSSL=ON ^
-DLLAMA_CURL=OFF ^
-DLLAMA_BORINGSSL=ON ^
-DGGML_NATIVE=OFF ^
-DGGML_BACKEND_DL=ON ^
-DGGML_CPU_ALL_VARIANTS=ON ^
Expand Down Expand Up @@ -1227,7 +1230,8 @@ jobs:
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
-DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/opt/rocm-${{ env.ROCM_VERSION }}/include/" `
-DCMAKE_BUILD_TYPE=Release `
-DLLAMA_BUILD_BORINGSSL=ON `
-DLLAMA_CURL=OFF `
-DLLAMA_BORINGSSL=ON `
-DROCM_DIR="${env:HIP_PATH}" `
-DGGML_HIP=ON `
-DGGML_HIP_ROCWMMA_FATTN=ON `
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Build
id: cmake_build
run: |
cmake -B build -DLLAMA_BUILD_BORINGSSL=ON -DGGML_SCHED_NO_REALLOC=ON
cmake -B build -DLLAMA_BORINGSSL=ON -DGGML_SCHED_NO_REALLOC=ON
cmake --build build --config ${{ matrix.build_type }} -j ${env:NUMBER_OF_PROCESSORS} --target llama-server

- name: Python setup
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Build
id: cmake_build
run: |
cmake -B build -DLLAMA_BUILD_BORINGSSL=ON -DGGML_SCHED_NO_REALLOC=ON
cmake -B build -DLLAMA_BORINGSSL=ON -DGGML_SCHED_NO_REALLOC=ON
cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS} --target llama-server

- name: Python setup
Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
option(LLAMA_TOOLS_INSTALL "llama: install tools" ${LLAMA_TOOLS_INSTALL_DEFAULT})

# 3rd party libs
option(LLAMA_HTTPLIB "llama: httplib for downloading functionality" ON)
option(LLAMA_OPENSSL "llama: use openssl to support HTTPS" ON)
option(LLAMA_CURL "llama: use libcurl to download model from an URL" OFF)
option(LLAMA_HTTPLIB "llama: if libcurl is disabled, use httplib to download model from an URL" ON)
option(LLAMA_BORINGSSL "llama: use boringssl to support HTTPS" ON)
option(LLAMA_LIBRESSL "llama: use libressl to support HTTPS" OFF)
option(LLAMA_OPENSSL "llama: use openssl to support HTTPS" OFF)
option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)

# deprecated
Expand Down
Binary file modified tools/server/public/index.html.gz
Binary file not shown.
23 changes: 20 additions & 3 deletions tools/server/server-models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,11 +1000,20 @@ server_http_proxy::server_http_proxy(
int32_t timeout_write
) {
// shared between reader and writer threads
auto cli = std::make_shared<httplib::Client>(host, port);
auto cli = std::make_shared<httplib::ClientImpl>(host, port);
auto pipe = std::make_shared<pipe_t<msg_t>>();

if (port == 443) {
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
cli.reset(new httplib::SSLClient(host, port));
#else
throw std::runtime_error("HTTPS requested but CPPHTTPLIB_OPENSSL_SUPPORT is not defined");
#endif
}

// setup Client
cli->set_connection_timeout(0, 200000); // 200 milliseconds
cli->set_follow_location(true);
cli->set_connection_timeout(5, 0); // 5 seconds
cli->set_write_timeout(timeout_read, 0); // reversed for cli (client) vs srv (server)
cli->set_read_timeout(timeout_write, 0);
this->status = 500; // to be overwritten upon response
Expand Down Expand Up @@ -1053,7 +1062,15 @@ server_http_proxy::server_http_proxy(
req.method = method;
req.path = path;
for (const auto & [key, value] : headers) {
req.set_header(key, value);
if (key == "Accept-Encoding") {
// disable Accept-Encoding to avoid compressed responses
continue;
}
if (key == "Host" || key == "host") {
req.set_header(key, host);
} else {
req.set_header(key, value);
}
}
req.body = body;
req.response_handler = response_handler;
Expand Down
50 changes: 48 additions & 2 deletions tools/server/server-models.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "common.h"
#include "preset.h"
#include "http.h"
#include "server-common.h"
#include "server-http.h"

Expand Down Expand Up @@ -184,8 +185,8 @@ struct server_http_proxy : server_http_res {
const std::map<std::string, std::string> & headers,
const std::string & body,
const std::function<bool()> should_stop,
int32_t timeout_read,
int32_t timeout_write
int32_t timeout_read = 600,
int32_t timeout_write = 600
);
~server_http_proxy() {
if (cleanup) {
Expand All @@ -201,3 +202,48 @@ struct server_http_proxy : server_http_res {
std::string content_type;
};
};

// BELOW IS DEMO CODE FOR PROXY HANDLERS
// DO NOT MERGE IT AS-IS

static server_http_res_ptr proxy_request(const server_http_req & req, std::string method) {
std::string target_url = req.get_param("url");
common_http_url parsed_url = common_http_parse_url(target_url);

if (parsed_url.host.empty()) {
throw std::runtime_error("invalid target URL: missing host");
}

if (parsed_url.path.empty()) {
parsed_url.path = "/";
}

if (!parsed_url.password.empty()) {
throw std::runtime_error("authentication in target URL is not supported");
}

if (parsed_url.scheme != "http" && parsed_url.scheme != "https") {
throw std::runtime_error("unsupported URL scheme in target URL: " + parsed_url.scheme);
}

SRV_INF("proxying %s request to %s://%s%s\n", method.c_str(), parsed_url.scheme.c_str(), parsed_url.host.c_str(), parsed_url.path.c_str());

auto proxy = std::make_unique<server_http_proxy>(
method,
parsed_url.host,
parsed_url.scheme == "http" ? 80 : 443,
parsed_url.path,
req.headers,
req.body,
req.should_stop);

return proxy;
}

static server_http_context::handler_t proxy_handler_post = [](const server_http_req & req) -> server_http_res_ptr {
return proxy_request(req, "POST");
};

static server_http_context::handler_t proxy_handler_get = [](const server_http_req & req) -> server_http_res_ptr {
return proxy_request(req, "GET");
};
3 changes: 3 additions & 0 deletions tools/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ int main(int argc, char ** argv) {
// Save & load slots
ctx_http.get ("/slots", ex_wrapper(routes.get_slots));
ctx_http.post("/slots/:id_slot", ex_wrapper(routes.post_slots));
// CORS proxy
ctx_http.get ("/cors-proxy", ex_wrapper(proxy_handler_get));
ctx_http.post("/cors-proxy", ex_wrapper(proxy_handler_post));

//
// Start the server
Expand Down
17 changes: 12 additions & 5 deletions tools/server/webui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import type { StorybookConfig } from '@storybook/sveltekit';
import { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';

const __dirname = dirname(fileURLToPath(import.meta.url));

const config: StorybookConfig = {
stories: ['../tests/stories/**/*.mdx', '../tests/stories/**/*.stories.@(js|ts|svelte)'],
addons: [
'@storybook/addon-svelte-csf',
'@chromatic-com/storybook',
'@storybook/addon-docs',
'@storybook/addon-vitest',
'@storybook/addon-a11y',
'@storybook/addon-vitest'
'@storybook/addon-docs'
],
framework: {
name: '@storybook/sveltekit',
options: {}
framework: '@storybook/sveltekit',
viteFinal: async (config) => {
config.server = config.server || {};
config.server.fs = config.server.fs || {};
config.server.fs.allow = [...(config.server.fs.allow || []), resolve(__dirname, '../tests')];
return config;
}
};
export default config;
2 changes: 1 addition & 1 deletion tools/server/webui/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const preview: Preview = {
},

backgrounds: {
disable: true
disabled: true
},

a11y: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ flowchart TB
C_Form["ChatForm"]
C_Messages["ChatMessages"]
C_Message["ChatMessage"]
C_AgenticContent["AgenticContent"]
C_MessageEditForm["ChatMessageEditForm"]
C_ModelsSelector["ModelsSelector"]
C_Settings["ChatSettings"]
C_McpSettings["McpSettingsSection"]
end

subgraph Hooks["🪝 Hooks"]
Expand All @@ -27,20 +29,26 @@ flowchart TB
S2["conversationsStore<br/><i>Conversation data & messages</i>"]
S3["modelsStore<br/><i>Model selection & loading</i>"]
S4["serverStore<br/><i>Server props & role detection</i>"]
S5["settingsStore<br/><i>User configuration</i>"]
S5["settingsStore<br/><i>User configuration incl. MCP</i>"]
end

subgraph Services["⚙️ Services"]
SV1["ChatService"]
SV1["ChatService<br/><i>incl. agentic loop</i>"]
SV2["ModelsService"]
SV3["PropsService"]
SV4["DatabaseService"]
SV5["ParameterSyncService"]
end

subgraph MCP["🔧 MCP (Model Context Protocol)"]
MCP1["MCPClient<br/><i>@modelcontextprotocol/sdk</i>"]
MCP2["mcpStore<br/><i>reactive state</i>"]
MCP3["OpenAISseClient"]
end

subgraph Storage["💾 Storage"]
ST1["IndexedDB<br/><i>conversations, messages</i>"]
ST2["LocalStorage<br/><i>config, userOverrides</i>"]
ST2["LocalStorage<br/><i>config, userOverrides, mcpServers</i>"]
end

subgraph APIs["🌐 llama-server API"]
Expand All @@ -50,15 +58,22 @@ flowchart TB
API4["/v1/models"]
end

subgraph ExternalMCP["🔌 External MCP Servers"]
EXT1["MCP Server 1"]
EXT2["MCP Server N"]
end

%% Routes → Components
R1 & R2 --> C_Screen
RL --> C_Sidebar

%% Component hierarchy
C_Screen --> C_Form & C_Messages & C_Settings
C_Messages --> C_Message
C_Message --> C_AgenticContent
C_Message --> C_MessageEditForm
C_Form & C_MessageEditForm --> C_ModelsSelector
C_Settings --> C_McpSettings

%% Components → Hooks → Stores
C_Form & C_Messages --> H1 & H2
Expand All @@ -70,6 +85,7 @@ flowchart TB
C_Sidebar --> S2
C_ModelsSelector --> S3 & S4
C_Settings --> S5
C_McpSettings --> S5

%% Stores → Services
S1 --> SV1 & SV4
Expand All @@ -78,6 +94,12 @@ flowchart TB
S4 --> SV3
S5 --> SV5

%% ChatService → MCP (Agentic Mode)
SV1 --> MCP2
MCP2 --> MCP1
SV1 --> MCP3
MCP3 --> API1

%% Services → Storage
SV4 --> ST1
SV5 --> ST2
Expand All @@ -87,6 +109,9 @@ flowchart TB
SV2 --> API3 & API4
SV3 --> API2

%% MCP → External Servers
MCP1 --> EXT1 & EXT2

%% Styling
classDef routeStyle fill:#e1f5fe,stroke:#01579b,stroke-width:2px
classDef componentStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
Expand All @@ -95,12 +120,16 @@ flowchart TB
classDef serviceStyle fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
classDef storageStyle fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef apiStyle fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
classDef mcpStyle fill:#e0f2f1,stroke:#00695c,stroke-width:2px
classDef externalStyle fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px,stroke-dasharray: 5 5

class R1,R2,RL routeStyle
class C_Sidebar,C_Screen,C_Form,C_Messages,C_Message,C_MessageEditForm,C_ModelsSelector,C_Settings componentStyle
class C_Sidebar,C_Screen,C_Form,C_Messages,C_Message,C_AgenticContent,C_MessageEditForm,C_ModelsSelector,C_Settings,C_McpSettings componentStyle
class H1,H2 hookStyle
class S1,S2,S3,S4,S5 storeStyle
class SV1,SV2,SV3,SV4,SV5 serviceStyle
class ST1,ST2 storageStyle
class API1,API2,API3,API4 apiStyle
class MCP1,MCP2,MCP3 mcpStyle
class EXT1,EXT2 externalStyle
```
Loading
Loading