Skip to content

feat: combine PRs #178-#182 into one integration PR#183

Draft
Copilot wants to merge 8 commits intomainfrom
copilot/combine-prs-178-179-180-181-182
Draft

feat: combine PRs #178-#182 into one integration PR#183
Copilot wants to merge 8 commits intomainfrom
copilot/combine-prs-178-179-180-181-182

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • pytest instrumentation-loongsuite/loongsuite-instrumentation-bfclv4/tests -vv
  • pytest instrumentation-loongsuite/loongsuite-instrumentation-widesearch/tests -vv
  • pytest instrumentation-loongsuite/loongsuite-instrumentation-slop-code/tests -vv
  • pytest instrumentation-loongsuite/loongsuite-instrumentation-vita/tests -vv (fails in sandbox: missing external vita package)
  • pytest instrumentation-loongsuite/loongsuite-instrumentation-wildtool/tests -vv (fails in sandbox: missing external wtb package)
  • 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?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

musi and others added 7 commits May 7, 2026 01:41
…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>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ 123liuziming
❌ musi


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.

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>
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.

5 participants