feat: combine PRs #178-#182 into one integration PR#183
Draft
feat: combine PRs #178-#182 into one integration PR#183
Conversation
…ard v4 Introduce loongsuite-instrumentation-bfclv4 covering BFCL v4 (bfcl_eval) per the design in llm-dev/bfclv4/execute.md: * ENTRY span around bfcl_eval._llm_response_generation.generate_results, with a narrow swap of that module's ThreadPoolExecutor name to a contextvars-propagating subclass so worker threads inherit the ENTRY trace context. * AGENT span around BaseHandler.inference (kind=AGENT, op=invoke_agent), picking up token usage from the metadata BFCL writes back. * STEP spans created reflectively for every concrete handler discovered via bfcl_eval.constants.model_config.MODEL_CONFIG_MAPPING; each STEP re-invokes the handler's _parse_query_response_* to harvest token counts and latency. * Per-call TOOL spans emitted from bfcl_eval.eval_checker.multi_turn_eval.multi_turn_utils.execute_multi_turn_func_call (one span per func_call entry in the batch). * Provider override mapping that routes OSSMODEL handlers to vllm/sglang based on args.backend, plus contextvars-based bfcl.turn_idx / gen_ai.react.round tracking. LLM spans are intentionally not created by this plugin; they continue to be produced by the downstream vendor SDK probes (OpenAI / Anthropic / DashScope / etc.). (cherry picked from commit cccf54b) Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
(cherry picked from commit 3d08e03) Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
… responses When ``_query_FC`` / ``_query_prompting`` returns a streaming wrapper (e.g. ``openai-v2`` ``ChatStreamWrapper``), the LLM span and its OTel context attach are kept alive until the stream is consumed by BFCL's ``_parse_query_response_*`` after the STEP context manager has already exited. Non-LIFO context detach then leaves the prior LLM span as the "current" span, which causes subsequent STEP and TOOL spans to be parented under the previous STEP rather than under AGENT. Force-consume the streaming response inside the STEP context and replace it with a plain iterator over the cached chunks so that ``stop_llm`` (which detaches LLM context) runs in LIFO order before STEP detaches. (cherry picked from commit 5cbd049) Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
Change-Id: I84e87248e0eec61fa8f7fa68dbe85e5181ddede8 (cherry picked from commit 2071e80) Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
Change-Id: I71842eb28f7a3c8d5c0fb0e9e2caec31e69d19f0 (cherry picked from commit 9abf7a1) Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
Change-Id: Ieea04708467272866f5b7d9b905a2a648e6adb2d (cherry picked from commit 80e202c) Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
Change-Id: I0da98161cbdbe6a51b963bcc19f45a3d2d977968 (cherry picked from commit b7e7a4b) Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
|
musi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Copilot created this pull request from a session on behalf of
123liuziming
May 7, 2026 01:48
View session
This commit introduces support for a new tool, enhancing the existing functionality and maintaining compatibility with previous integrations. Change-Id: I674acb157591b4bee6f951defbbc8a57135ce036 Co-authored-by: 123liuziming <32130965+123liuziming@users.noreply.github.com>
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.
Description
Combine the changes from PRs #178, #179, #180, #181, and #182 into a single review branch. This bundles the new BFCLv4, WideSearch, VitaBench, slop-code-bench, and WildToolBench instrumentations into one PR without adding extra feature work beyond the original commits.
Fixes # (issue)
Type of change
How Has This Been Tested?
pytest instrumentation-loongsuite/loongsuite-instrumentation-bfclv4/tests -vvpytest instrumentation-loongsuite/loongsuite-instrumentation-widesearch/tests -vvpytest instrumentation-loongsuite/loongsuite-instrumentation-slop-code/tests -vvpytest instrumentation-loongsuite/loongsuite-instrumentation-vita/tests -vv(fails in sandbox: missing externalvitapackage)pytest instrumentation-loongsuite/loongsuite-instrumentation-wildtool/tests -vv(fails in sandbox: missing externalwtbpackage)python -m ruff check instrumentation-loongsuite/loongsuite-instrumentation-{bfclv4,widesearch,vita,slop-code,wildtool}(currently reports lint issues inside the imported PR changes)parallel_validation(Code Review + CodeQL)Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.