semblance/backend/app/services
Vadym Samoilenko ad619d45fc Improve live token extraction: warn on missing usage_metadata, capture thinking tokens
- Add WARNING log when usage_metadata/usage is None so zero-cost events
  are visible in logs instead of silently disappearing
- Capture thoughts_token_count from Gemini thinking models into reasoning field
  (already included in candidates_token_count for billing, now also tracked separately)
- Add same warning for OpenAI missing usage object

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 19:13:39 +01:00
..
ai_moderator_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
ai_persona_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
ai_runner_service.py changed permissions 2025-12-19 19:26:16 +00:00
autonomous_conversation_controller.py Complete phases D–G: quota enforcement, token invalidation, admin writes, backfill 2026-04-24 18:34:48 +01:00
bulk_persona_export_service.py Migrate task result delivery from WebSocket to HTTP polling 2026-03-23 16:46:58 +00:00
conversation_context_service.py Fix root cause: naive vs aware datetime crash + stuck AI mode indicator 2026-03-23 19:30:04 +00:00
conversation_decision_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
conversation_state_manager.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
customer_data_service.py changed permissions 2025-12-19 19:26:16 +00:00
focus_group_response_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
focus_group_service.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
focus_group_summary_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
image_description_service.py Allow document uploads (PDF, DOCX, TXT, etc.) as focus group assets 2026-03-23 17:08:30 +00:00
key_theme_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
llm_service.py Improve live token extraction: warn on missing usage_metadata, capture thinking tokens 2026-04-24 19:13:39 +01:00
llm_usage_context.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
msal_service.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
persona_export_service.py changed permissions 2025-12-19 19:26:16 +00:00
persona_modification_service.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
task_manager.py Migrate task result delivery from WebSocket to HTTP polling 2026-03-23 16:46:58 +00:00