Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4451
Haystack LLM/generator spans never carry
llm.invocation_parameters, sogeneration_kwargssuch astemperature=0.0andmax_tokens=50are invisible in traces.Root cause
The GENERATOR branch of
_set_component_runner_request_attributes()sets span kind and input attributes but never emitsLLM_INVOCATION_PARAMETERS, even though the constant is bound in the module. The embedder branch already emits its invocation parameters.Fix
Added
_get_llm_invocation_parameters()which merges component-level and per-rungeneration_kwargs(per-run wins) and serializes withsafe_json_dumps. Values are preserved by key presence, not truthiness, so0.0survives. Wired into the GENERATOR branch.Verification
test_output_messages_keep_content_without_finish_reasonfailed withKeyError: 'llm.invocation_parameters', exit 1.ruff format --check: clean.ruff check: only two pre-existing I001 warnings, identical on base.mypy: one pre-existing no-any-return unrelated to this change.Live provider paths not exercised; VCR cassettes only. Pinned CI haystack version not reproduced.