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>
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>
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>
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>
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>
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>
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>
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>
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>