Skip to content

fix: kalibr_model_used on response + re-resolve tenant_id in singleton#190

Merged
devonakelley merged 1 commit into
mainfrom
fix/model-attribution-outcome-reporting
May 21, 2026
Merged

fix: kalibr_model_used on response + re-resolve tenant_id in singleton#190
devonakelley merged 1 commit into
mainfrom
fix/model-attribution-outcome-reporting

Conversation

@devonakelley
Copy link
Copy Markdown
Contributor

Two bug fixes found during simulation testing:

  1. kalibr_model_used not set on response -- completion() set kalibr_trace_id, kalibr_healed, kalibr_heal_count, kalibr_models_tried but never kalibr_model_used. Fixed at both the heal path (uses used_model) and the normal path (uses candidate_model).

  2. Singleton tenant_id empty if env var set after construction -- _get_intelligence_client() creates the singleton once. If KALIBR_TENANT_ID was not in env at first call, tenant_id was empty string, causing 422 on every report_outcome call. Fixed: re-resolves on each call if tenant_id is empty.

@devonakelley devonakelley merged commit 79b2762 into main May 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant