mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-01 00:59:33 +00:00
fix: address PR review feedback from gemini-code-assist
- Fix parse_custom_headers to preserve commas in values by splitting
only on commas followed by a header-name:colon pattern (manual scan
instead of simple split(','))
- Use matches! macro for backend exclusion check in app.rs
- Merge SSE metadata extraction into single pass (was iterating twice)
- Replace fragile substring-based context_length with explicit match
on known Gemini model IDs via gemini_context_length()
- Add missing models to regression test (8 models, not 5)
This commit is contained in:
+4
-4
@@ -686,10 +686,10 @@ impl AppBuilder {
|
||||
// Post-init validation: backends with dedicated config (nearai, gemini_oauth,
|
||||
// bedrock) handle their own credential resolution. For registry-based backends,
|
||||
// fail early if no provider config was resolved.
|
||||
if self.config.llm.backend != "nearai"
|
||||
&& self.config.llm.backend != "gemini_oauth"
|
||||
&& self.config.llm.backend != "bedrock"
|
||||
&& self.config.llm.provider.is_none()
|
||||
if !matches!(
|
||||
self.config.llm.backend.as_str(),
|
||||
"nearai" | "gemini_oauth" | "bedrock"
|
||||
) && self.config.llm.provider.is_none()
|
||||
{
|
||||
let backend = &self.config.llm.backend;
|
||||
anyhow::bail!(
|
||||
|
||||
Reference in New Issue
Block a user