Commit Graph

11 Commits

Author SHA1 Message Date
dadc178fd6 Add timeouts and improve health checks
Changes:
- Health checks now have 5 second timeout (was no timeout)
- Chat requests have 120 second timeout (was no timeout)
- Health checks verify response body structure, not just status code
- Ollama: Verifies 'models' field exists in /api/tags response
- OpenAI: Verifies 'data' field exists in /models response

This prevents false-positive health checks where the endpoint
responds but actual API calls timeout (524 Gateway Timeout).

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 15:37:21 +01:00
9f1b5f908d Add /connect command to REPL for provider health check
New REPL command:
  /connect - Check connectivity to all configured providers

Features:
- Lists all providers with health status (✓/✗)
- Shows healthy/unhealthy status for each
- Summarizes overall health

Updated:
- Repl struct now holds provider_registry reference
- handle_command() is now async to support health checks
- Help text updated with new command

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 15:17:47 +01:00
b52d82dec5 Allow zero-config models - use provider default
Users can now omit the models section entirely from agent config.
The agent will automatically use the default model from an available provider.

Changes:
- Agent.get_model(): Falls back to provider name ("ollama" or "openai")
- ProviderRegistry.resolve_provider(): Handles bare provider names
- OpenAiProvider.parse_model(): Uses default_model when spec is "openai"
- OllamaProvider.parse_model(): Uses default_model when spec is "ollama"

Example minimal config (no models needed):
[[providers.ollama]]
base_url = "http://localhost:11434"
default_model = "llama3"

[agents.default]
description = "Default agent"
system_prompt = "You are helpful."
tools = ["file", "shell", "git"]
# No [agents.default.models] needed!

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 15:08:07 +01:00
aa778579ee Add fallback models when not configured
When no models are specified in agent config, use sensible defaults:
- Chat/Default tasks: ollama/llama3
- Code/Planning/ToolUse: openai/gpt-4o

This allows minimal configs without explicit model routing.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 14:52:04 +01:00
d874194d95 Make agents.<name>.models optional
Changes:
- agents.<name>.models is now optional (uses serde default)
- If models not specified, uses default model for all task types
- AgentModels.for_task() now takes TaskType enum and returns cloned String
- Falls back to default model if task-specific model not set
- Default agent config simplified to only set default model

Example minimal agent config:
[agents.default]
description = "Default agent"
system_prompt = "You are helpful."
tools = ["file", "shell", "git"]
# No models needed - uses provider default

Example with only default model:
[agents.default.models]
default = "ollama/llama3"
# All tasks use llama3

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 14:44:49 +01:00
bd8350b52a Fix REPL panic: make run() async
The REPL was using block_on() inside an already running tokio runtime,
which caused a panic. Changed run() to be async and await directly.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 14:33:35 +01:00
b66d474cd3 Add support for multiple providers of same type
Features:
- Multiple OpenAI instances (e.g., OpenAI + local AI proxy)
- Multiple Ollama instances (e.g., local + remote)
- API key not required if at least one provider works without it
- Provider instances can have optional names for reference

Config format (TOML arrays):
[[providers.openai]]
name = "openai-main"
api_key = "sk-..."
base_url = "https://api.openai.com/v1"

[[providers.openai]]
name = "local-ai"
base_url = "http://localhost:8080/v1"

[[providers.ollama]]
name = "local"
base_url = "http://localhost:11434"

[[providers.ollama]]
name = "remote"
base_url = "http://192.168.1.100:11434"
bearer_token = "token"

Changes:
- config/types.rs: Changed providers from Option<T> to Vec<T>
- config/loader.rs: Updated merge logic for provider arrays
- providers/registry.rs: Register all provider instances, skip those without API keys if alternatives exist

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 14:27:39 +01:00
SVibe Developer
d4cebe21c7 Add README.md with comprehensive documentation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 13:44:39 +01:00
SVibe Developer
5dd7c652c5 Add local project config support (.svibe/config.toml)
Features:
- Local config at .svibe/config.toml overrides global config
- New 'svibe init --local' command creates project-specific config
- Config merging: global -> local -> environment variables
- Added .svibe to .gitignore (project configs typically not shared)

Changes:
- config/loader.rs: Added local config detection and merging logic
- cli/commands.rs: Added --local flag to init command
- main.rs: Updated init command handling
- QWEN.md: Updated documentation with local config info

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 13:40:27 +01:00
SVibe Developer
72107f85d8 Fix: Handle init command before config loading
The init command was being processed after attempting to load config,
causing it to fail when no config existed. Now init is handled first
so users can create the initial configuration.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 13:30:26 +01:00
SVibe Developer
c723e5fc40 Initial commit: svibe agentic CLI tool
Features:
- Multi-provider support (OpenAI, Ollama) with bearer/basic auth
- Hierarchical agents with supervisor pattern
- Model routing per task type (chat, code, planning, tool_use)
- Built-in tools: file ops, shell commands, git operations
- MCP protocol support for external tools
- CLI with REPL and single-command modes
- TOML configuration with environment variable overrides

Architecture:
- config/ - Configuration system
- providers/ - AI model provider abstraction
- tools/ - Built-in development tools
- mcp/ - Model Context Protocol implementation
- agents/ - Agent system with delegation
- cli/ - Command-line interface

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-19 11:18:39 +01:00