Add Google Gemini provider support
- Add GeminiProvider with streaming and native tool calling - Support gemini-2.5-pro, gemini-2.0-flash, gemini-1.5-pro/flash models - Model-specific context window detection (1M-2M tokens) - Message conversion: assistant -> model role mapping - System messages extracted to system_instruction field - Tool schema conversion with functionCall/functionResponse parts - SSE streaming with JSON array buffer parsing - 8 unit tests for conversion and parsing logic - Register provider in g3-core and validate in g3-cli
This commit is contained in:
@@ -138,7 +138,7 @@ pub fn load_config_with_cli_overrides(cli: &Cli) -> Result<Config> {
|
||||
|
||||
// Validate provider if specified
|
||||
if let Some(ref provider) = cli.provider {
|
||||
let valid_providers = ["anthropic", "databricks", "embedded", "openai"];
|
||||
let valid_providers = ["anthropic", "databricks", "embedded", "gemini", "openai"];
|
||||
let provider_type = provider.split('.').next().unwrap_or(provider);
|
||||
if !valid_providers.contains(&provider_type) {
|
||||
return Err(anyhow::anyhow!(
|
||||
|
||||
Reference in New Issue
Block a user