Commit graph

4 commits

Author SHA1 Message Date
Adil Hafeez
a0513fe191 fix: restore span attributes, OTEL_SERVICE_NAME, config path, and error status 2026-03-06 14:48:32 +00:00
Adil Hafeez
66e55e1621 refactor: pass AppState to handlers, add shared HTTP client, fix remaining unwraps
- Pass Arc<AppState> directly to llm_chat and agent_chat instead of
  destructuring into individual parameters
- Add shared reqwest::Client to AppState for connection pooling on
  upstream LLM requests
- Fix unwrap panics in pipeline.rs: get_new_session_id now returns
  Result, invoke_agent to_bytes properly handled
- Fix unwrap panics in orchestrator.rs: strip_prefix and pop
- Fix unwrap panics in response.rs: SSE parsing no longer panics
- Fix unwrap panics in router services: serialization errors propagated
- Convert old-style string-format debug log in state/mod.rs to
  structured tracing fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:54:00 +00:00
Adil Hafeez
6fcecb60c3 fix: restore LLM span recordings and replace unwrap panics with proper errors
- Restore llm.model, llm.tools, llm.user_message_preview, llm.temperature
  span field recordings that were lost during refactor
- Replace agents.as_ref().unwrap() and agent_map.get().unwrap() in
  orchestrator with proper error returns
- Replace from_endpoint().unwrap() with ok_or_else returning 400
- Replace to_bytes().unwrap() with match returning 500

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:54:00 +00:00
Adil Hafeez
3fdd8a3a35 refactor brightstaff 2026-03-06 12:54:00 +00:00