Files
herolib/lib/clients/openrouter/client_test.v
Mahmoud-Emad 4222dac72e refactor: Update OpenRouter client and examples
- Add error handling for client initialization
- Improve example scripts for clarity and robustness
- Refine client configuration and usage patterns
- Update documentation with current examples and features
- Enhance model handling and response processing
2025-10-28 22:40:37 +03:00

14 lines
354 B
V

module openrouter
fn test_factory() {
mut client := get(name: 'default', create: true)!
assert client.name == 'default'
assert client.url == 'https://openrouter.ai/api/v1'
assert client.model_default == 'qwen/qwen-2.5-coder-32b-instruct'
}
fn test_client_creation() {
mut client := new(name: 'test_client')!
assert client.name == 'test_client'
}