Commit ba1993e
authored
refactor: remove Ollama and add custom provider configuration (#546)
* feat(config): add ExecutionConfig for runtime behavior settings
Add ExecutionConfig struct for controlling runtime execution:
- max_agent_threads: Maximum concurrent agent threads
- max_tool_threads: Maximum concurrent tool executions
- command_timeout_secs: Timeout for shell commands
- http_timeout_secs: Timeout for HTTP requests
- streaming_enabled: Enable/disable streaming responses
This allows users to customize execution behavior via config files.
* feat(config): add custom providers configuration support
Add CustomProviderConfig and CustomModelConfig types for user-defined
LLM providers in config.toml:
- base_url: Provider API endpoint
- api_type: openai/anthropic/openai-compatible
- api_key_env: Environment variable for API key
- default_model: Default model for provider
- models: Available models with capabilities
- headers: Custom HTTP headers
Enables users to add their own providers without code changes.
* feat(cli): add runtime execution configuration arguments
Add CLI arguments for controlling execution behavior:
- --max-agent-threads: Maximum concurrent agent threads
- --max-tool-threads: Maximum concurrent tool executions
- --command-timeout: Timeout for shell commands in seconds
- --http-timeout: Timeout for HTTP requests in seconds
- --no-streaming: Disable streaming responses
These arguments override config file settings at runtime.
* refactor: remove cortex-ollama crate and all backend references
Remove Ollama integration from the backend:
- Delete cortex-ollama crate entirely
- Remove from workspace members and dependencies
- Remove Ollama model presets from cortex-common
- Remove OllamaEmbedder from cortex-engine
- Remove Ollama provider references from CLI utilities
- Remove Ollama options from app-server config
- Clean up related imports and references
Users can now add custom local providers via the new
custom providers configuration system.
* refactor(gui): remove Ollama provider from cortex-gui
Remove all Ollama provider references from the GUI:
- Delete OllamaProvider.ts implementation
- Remove Ollama from AIProvider enum (backend)
- Remove Ollama from LLMProviderType union type
- Remove Ollama from provider configuration objects
- Remove Ollama from model selectors and settings
- Remove Ollama from onboarding wizard
- Update package-lock.json dependencies
The custom providers system now allows users to configure
local inference endpoints without built-in Ollama support.1 parent 6a4d543 commit ba1993e
43 files changed
Lines changed: 329 additions & 2608 deletions
File tree
- src
- cortex-app-server/src
- cortex-cli/src
- agent_cmd
- cli
- utils
- cortex-common/src/model_presets
- cortex-engine/src
- config
- memory
- cortex-gui
- src-tauri/src/ai
- src
- components
- ai
- factory/builders
- onboarding
- context
- providers
- types
- utils/llm
- cortex-ollama
- src
- cortex-tui/src/commands
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 83 | | |
87 | 84 | | |
88 | 85 | | |
| |||
224 | 221 | | |
225 | 222 | | |
226 | 223 | | |
227 | | - | |
228 | 224 | | |
229 | 225 | | |
230 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | 377 | | |
381 | 378 | | |
382 | 379 | | |
| |||
385 | 382 | | |
386 | 383 | | |
387 | 384 | | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | 385 | | |
393 | 386 | | |
394 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
211 | 231 | | |
212 | 232 | | |
213 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | 414 | | |
444 | 415 | | |
445 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | 289 | | |
295 | 290 | | |
296 | 291 | | |
| |||
319 | 314 | | |
320 | 315 | | |
321 | 316 | | |
322 | | - | |
| 317 | + | |
323 | 318 | | |
324 | 319 | | |
325 | 320 | | |
326 | 321 | | |
327 | 322 | | |
328 | 323 | | |
329 | 324 | | |
330 | | - | |
331 | | - | |
| 325 | + | |
| 326 | + | |
332 | 327 | | |
333 | 328 | | |
334 | 329 | | |
| |||
735 | 730 | | |
736 | 731 | | |
737 | 732 | | |
738 | | - | |
739 | | - | |
740 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
741 | 736 | | |
742 | 737 | | |
743 | 738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
0 commit comments