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:
Artem
2026-03-18 14:27:12 +03:00
parent 09a2320e64
commit 9be29b2c22
3 changed files with 121 additions and 96 deletions
+4 -4
View File
@@ -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!(