-
Notifications
You must be signed in to change notification settings - Fork 457
Fix missing the model name in the tracer span #363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing the model name in the tracer span #363
Conversation
Before this PR, the model name is always missing in tracer's span due to it's not set while creating the llm request.
Summary of ChangesHello @git-hulk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where the LLM model name was not being captured in tracer spans, hindering proper monitoring and debugging. It achieves this by explicitly setting the model name when an LLM request is initialized. Furthermore, the PR enhances the robustness of the system by relocating the model configuration validation to an earlier stage in the request lifecycle, ensuring that a model is configured before proceeding with an LLM call. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly fixes an issue where the model name was missing in tracer spans by populating the Model field in LLMRequest. The refactoring to move the model existence check to an earlier point in runOneStep is a good improvement for failing fast. The test updates are also correct. I've added one suggestion to improve error handling for better maintainability. Overall, this is a solid change.
|
/gemini review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively resolves the missing model name in tracer spans by correctly initializing the LLMRequest with the model name. The refactoring to perform the nil model check earlier is a good improvement for failing fast. The test updates are also appropriate. Overall, this is a solid and well-executed change.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
kdroste-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution,
LGTM
I think it's not related to the empty branch in the response. |
|
@kdroste-google @baptmont Could you please merge this PR if there's nothing else to be done? |
|
@git-hulk - thank you! |
|
@kdroste-google Thank you very much. |

Before this PR, the model name was always missing from tracer's span because it wasn't set when creating the LLM request:
And it will be fixed after this PR: