(&self)
| 24 | } |
| 25 | |
| 26 | fn discover_existing(&self) -> Result<Option<DiscoveredProvider>, ProviderError> { |
| 27 | let mut discovered = discover_with_spec(&SPEC, &RealDiscoveryContext)?.unwrap_or_default(); |
| 28 | |
| 29 | for key in inference::VERTEX_AI_CONFIG_KEY_NAMES { |
| 30 | if let Ok(val) = std::env::var(key) |
| 31 | && !val.trim().is_empty() |
| 32 | { |
| 33 | discovered.config.entry(key.to_string()).or_insert(val); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | if discovered.is_empty() { |
| 38 | Ok(None) |
| 39 | } else { |
| 40 | Ok(Some(discovered)) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | fn credential_env_vars(&self) -> &'static [&'static str] { |
| 45 | SPEC.credential_env_vars |
nothing calls this directly
no test coverage detected