Skip to content

feat: add Fabric LLM traffic metadata - #2656

Merged
Rana Singh (ranadeepsingh) merged 5 commits into
microsoft:masterfrom
ranadeepsingh:users/singhrana/fabric-llm-extended-properties
Aug 18, 2026
Merged

feat: add Fabric LLM traffic metadata#2656
Rana Singh (ranadeepsingh) merged 5 commits into
microsoft:masterfrom
ranadeepsingh:users/singhrana/fabric-llm-extended-properties

Conversation

@ranadeepsingh

@ranadeepsingh Rana Singh (ranadeepsingh) commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Attribute implicit Fabric OpenAI traffic from SynapseML so the Fabric LLM endpoint receives the complete workload classification without requiring callers to configure headers:

X-Taxonomy-TrafficType: Background
x-llm-service-tier: flex
X-Taxonomy-ExtendedProperties: {"feature":"synapseml","runtime":"<detected platform>"}

The header is added only when SynapseML uses the implicit Fabric OpenAI endpoint. Non-Fabric execution, explicit OpenAI endpoints, and custom URL roots remain caller-controlled and receive no SynapseML-owned extended properties.

Compatibility

  • Existing public APIs, Spark params, serialized models, and generated Python wrappers are unchanged.
  • Existing custom headers are preserved.
  • On the implicit Fabric path, SynapseML owns all three headers and replaces caller-provided casing variants with one canonical value each.

Implementation

  • Adds a stackable HasOpenAIFabricHeaders request-header trait that sends traffic type, service tier, and extended properties together across all three OpenAI request surfaces.
  • Uses PlatformDetails.CurrentPlatform for runtime attribution.
  • Removes caller-provided variants of all three headers case-insensitively before adding the service-owned values.
  • Preserves all existing custom headers and authentication behavior.
  • Adds targeted tests for chat completion, embedding, Responses, non-Fabric execution, explicit endpoints, custom URL roots, runtime, and caller-override behavior.

Validation

  • Rebased onto master at 7fd1a0b86762ca54c0a4ef7306e1d0f8827fb613.
  • OpenAIFabricHeadersSuite: 6 passed, including blank custom URL roots and raw null header entries.
  • Scala style, main compilation, test compilation, and code generation: passed with JDK 11.
  • Repository-pinned Black 22.3.0 check: passed.
  • git diff --check: passed.

References

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

Copy link
Copy Markdown

Hey Rana Singh (@ranadeepsingh) 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@ranadeepsingh Rana Singh (ranadeepsingh) changed the title Add Fabric LLM traffic metadata feat: add Fabric LLM traffic metadata Aug 18, 2026
@ranadeepsingh
Rana Singh (ranadeepsingh) marked this pull request as ready for review August 18, 2026 02:11
Copilot AI lite review requested due to automatic review settings August 18, 2026 02:11
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds SynapseML-owned Fabric request attribution for OpenAI stages by injecting X-Taxonomy-ExtendedProperties only when running on Fabric and using the implicit Fabric OpenAI endpoint, while leaving explicit endpoints and custom URL roots caller-controlled.

Changes:

  • Introduces a stackable HasOpenAIFabricHeaders trait that conditionally injects Fabric taxonomy metadata into request headers.
  • Wires the new trait into OpenAIChatCompletion, OpenAIEmbedding, and OpenAIResponses.
  • Adds a new Scala test suite covering Fabric vs non-Fabric, default vs explicit endpoints, and custom URL roots (currently via OpenAIChatCompletion).
Show a summary per file
File Description
cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/openai/OpenAI.scala Adds Fabric endpoint/runtime detection hooks and the new HasOpenAIFabricHeaders header-injection trait.
cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/openai/OpenAIChatCompletion.scala Mixes HasOpenAIFabricHeaders into Chat Completion stage.
cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/openai/OpenAIEmbedding.scala Mixes HasOpenAIFabricHeaders into Embedding stage.
cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/openai/OpenAIResponses.scala Mixes HasOpenAIFabricHeaders into Responses stage.
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/openai/OpenAIFabricHeadersSuite.scala Adds tests validating extended-properties injection/omission behavior (currently only exercised through Chat Completion).

Review details

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

Rana Singh (ranadeepsingh) pushed a commit to ranadeepsingh/SynapseML that referenced this pull request Aug 18, 2026
AB#5520317

## Summary
Make SynapseML-owned Fabric extended properties override caller headers
case-insensitively and expand regression coverage across chat completion,
embedding, and Responses stages.

## Prompting Intent
The engineer asked to run the repository's SynapseML PR readiness loop and
polish PR microsoft#2656 until its implementation, tests, metadata, and validation
evidence are merge-ready.

## Linked Sources
- Pull request: microsoft#2656
- Repair work item: https://dev.azure.com/msdata/A365/_workitems/edit/5520317
- Fabric taxonomy and class-of-service guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- AI Functions draft PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680

## Rationale
HTTP header names are case-insensitive, so replacing only the canonical key
could emit conflicting duplicate metadata when callers use different casing.
Filter all case variants before adding the service-owned value, and exercise
every OpenAI stage that mixes in the shared header trait.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
Copilot AI review requested due to automatic review settings August 18, 2026 02:21
@ranadeepsingh
Rana Singh (ranadeepsingh) force-pushed the users/singhrana/fabric-llm-extended-properties branch from 921059e to a223cd8 Compare August 18, 2026 02:21
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

1 similar comment
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

Rana Singh (ranadeepsingh) pushed a commit to ranadeepsingh/SynapseML that referenced this pull request Aug 18, 2026
AB#5520317

## Summary
Align Fabric metadata injection with the actual custom URL routing rule,
sanitize raw Spark-param header maps, and verify inclusion and omission across
all supported OpenAI stages.

## Prompting Intent
The engineer asked to run the SynapseML PR readiness loop for PR microsoft#2656 and fix
all current-head automated review findings with regression evidence.

## Linked Sources
- Pull request: microsoft#2656
- Custom URL review: microsoft#2656 (comment)
- Stage coverage review: microsoft#2656 (comment)
- Null-header review: microsoft#2656 (comment)
- Fabric taxonomy guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html

## Rationale
Header ownership must follow the same parameter-presence rule used to select
custom request URLs, including blank values. Raw Spark params can bypass public
setter normalization, so the shared sanitizer is applied before
case-insensitive comparisons. Positive and negative assertions now cover chat,
embedding, and Responses stages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
Copilot AI review requested due to automatic review settings August 18, 2026 02:41
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

PR loop CI triage

Final head 66429483d52e77e379766adcd1d4637f12a9dfb0 is rebased on current master, has zero unresolved review threads, and passed the local targeted/style/compile/codegen/Black gates plus all GitHub checks.

Azure build 231583050 is partiallySucceeded; its only failed check is Release Branch Compatibility Check spark4.1. The replay stopped before applying any files from this PR because configured prerequisite 04897bae9baa08f0d67855566f7bad235791d508 (Azure Search AAD auth, PR #2591) conflicts with spark4.1 in three unrelated Azure Search files:

  • AzureSearch.scala
  • AzureSearchAPI.scala
  • AzureSearchAuth.scala

No PR test ran in that lane. The current spark4.1 branch already contains the sanitizer behavior introduced by that prerequisite through its sync commit, but .pipelines/release-compat-prerequisites.txt still replays the original non-ancestor commit. This is a release-compatibility baseline/configuration blocker, not a failure in the OpenAI header change.

SynapseML CI and others added 4 commits August 17, 2026 20:47
AB#5520317

## Summary
Add SynapseML-owned Fabric LLM extended properties to OpenAI chat completion,
embedding, and Responses requests, identifying the feature as synapseml and
including the detected runtime.

## Prompting Intent
The engineer asked for a separate public SynapseML change that sends
X-Taxonomy-ExtendedProperties with feature set to synapseml while preserving
caller-owned behavior for non-Fabric and explicitly configured endpoints.

## Linked Sources
- Repair work item: https://dev.azure.com/msdata/A365/_workitems/edit/5520317
- Fabric taxonomy and class-of-service guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- AI Functions draft PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680

## Rationale
Implement the metadata as a stackable request-header trait shared by all three
OpenAI request surfaces. Restrict ownership to the implicit Fabric endpoint so
explicit endpoints and custom URL roots remain fully caller-controlled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
AB#5520317

## Summary
Make SynapseML-owned Fabric extended properties override caller headers
case-insensitively and expand regression coverage across chat completion,
embedding, and Responses stages.

## Prompting Intent
The engineer asked to run the repository's SynapseML PR readiness loop and
polish PR microsoft#2656 until its implementation, tests, metadata, and validation
evidence are merge-ready.

## Linked Sources
- Pull request: microsoft#2656
- Repair work item: https://dev.azure.com/msdata/A365/_workitems/edit/5520317
- Fabric taxonomy and class-of-service guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- AI Functions draft PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680

## Rationale
HTTP header names are case-insensitive, so replacing only the canonical key
could emit conflicting duplicate metadata when callers use different casing.
Filter all case variants before adding the service-owned value, and exercise
every OpenAI stage that mixes in the shared header trait.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
AB#5520317

## Summary
Align Fabric metadata injection with the actual custom URL routing rule,
sanitize raw Spark-param header maps, and verify inclusion and omission across
all supported OpenAI stages.

## Prompting Intent
The engineer asked to run the SynapseML PR readiness loop for PR microsoft#2656 and fix
all current-head automated review findings with regression evidence.

## Linked Sources
- Pull request: microsoft#2656
- Custom URL review: microsoft#2656 (comment)
- Stage coverage review: microsoft#2656 (comment)
- Null-header review: microsoft#2656 (comment)
- Fabric taxonomy guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html

## Rationale
Header ownership must follow the same parameter-presence rule used to select
custom request URLs, including blank values. Raw Spark params can bypass public
setter normalization, so the shared sanitizer is applied before
case-insensitive comparisons. Positive and negative assertions now cover chat,
embedding, and Responses stages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
AB#5520317

## Summary
Send traffic type, service tier, and extended properties together from the
shared SynapseML Fabric OpenAI header trait for chat completion, embedding, and
Responses requests.

## Prompting Intent
The engineer asked why PR microsoft#2656 only showed ExtendedProperties and requested
that all three Fabric workload headers be owned and emitted together.

## Linked Sources
- Pull request: microsoft#2656
- Repair work item: https://dev.azure.com/msdata/A365/_workitems/edit/5520317
- Fabric taxonomy and class-of-service guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- AI Functions draft PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680

## Rationale
SynapseML is the common owner of implicit Fabric OpenAI requests, so keeping
Background/flex classification beside feature/runtime attribution avoids
partial metadata and inconsistent behavior across OpenAI stages. All three
headers use the same Fabric-only guard and case-insensitive ownership rules.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
Copilot AI review requested due to automatic review settings August 18, 2026 03:55
@ranadeepsingh
Rana Singh (ranadeepsingh) force-pushed the users/singhrana/fabric-llm-extended-properties branch from 6642948 to 49d6343 Compare August 18, 2026 03:55
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

Updated in 49d6343dae: the shared implicit-Fabric trait now emits all three together—X-Taxonomy-TrafficType: Background, x-llm-service-tier: flex, and X-Taxonomy-ExtendedProperties: {"feature":"synapseml","runtime":"<detected>"}—with the same case-insensitive ownership and endpoint guard.

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

AB#5520317

## Summary
Rename the filtered caller-header map so the consolidated Fabric header merge
is easier to reason about and maintain.

## Prompting Intent
The engineer asked to keep polishing PR microsoft#2656 and address current-head review
feedback after consolidating all three Fabric workload headers.

## Linked Sources
- Pull request: microsoft#2656
- Review comment: microsoft#2656 (comment)
- Fabric taxonomy guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html

## Rationale
The map contains caller headers that remain after removing service-owned names,
so `remainingHeaders` accurately describes its contents and avoids implying
that the retained values are owned by SynapseML.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
Copilot AI review requested due to automatic review settings August 18, 2026 04:04
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

Final three-header CI status

Final head e572f9e8f16a66b367119b1bf819b11ca6bb7a8f sends all three headers together from HasOpenAIFabricHeaders and has zero unresolved review findings. Azure build 231591481 repeated the same unrelated spark4.1 prerequisite conflict documented above; all other checks passed and no PR code was exercised in the failed replay step.

@ranadeepsingh
Rana Singh (ranadeepsingh) merged commit 43f31cb into microsoft:master Aug 18, 2026
75 of 76 checks passed
Rana Singh (ranadeepsingh) pushed a commit that referenced this pull request Aug 18, 2026
AB#5520317

## Summary
Make SynapseML-owned Fabric extended properties override caller headers
case-insensitively and expand regression coverage across chat completion,
embedding, and Responses stages.

## Prompting Intent
The engineer asked to run the repository's SynapseML PR readiness loop and
polish PR #2656 until its implementation, tests, metadata, and validation
evidence are merge-ready.

## Linked Sources
- Pull request: #2656
- Repair work item: https://dev.azure.com/msdata/A365/_workitems/edit/5520317
- Fabric taxonomy and class-of-service guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- AI Functions draft PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680

## Rationale
HTTP header names are case-insensitive, so replacing only the canonical key
could emit conflicting duplicate metadata when callers use different casing.
Filter all case variants before adding the service-owned value, and exercise
every OpenAI stage that mixes in the shared header trait.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
Rana Singh (ranadeepsingh) pushed a commit that referenced this pull request Aug 18, 2026
AB#5520317

## Summary
Align Fabric metadata injection with the actual custom URL routing rule,
sanitize raw Spark-param header maps, and verify inclusion and omission across
all supported OpenAI stages.

## Prompting Intent
The engineer asked to run the SynapseML PR readiness loop for PR #2656 and fix
all current-head automated review findings with regression evidence.

## Linked Sources
- Pull request: #2656
- Custom URL review: #2656 (comment)
- Stage coverage review: #2656 (comment)
- Null-header review: #2656 (comment)
- Fabric taxonomy guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html

## Rationale
Header ownership must follow the same parameter-presence rule used to select
custom request URLs, including blank values. Raw Spark params can bypass public
setter normalization, so the shared sanitizer is applied before
case-insensitive comparisons. Positive and negative assertions now cover chat,
embedding, and Responses stages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
Rana Singh (ranadeepsingh) pushed a commit that referenced this pull request Aug 18, 2026
AB#5520317

## Summary
Send traffic type, service tier, and extended properties together from the
shared SynapseML Fabric OpenAI header trait for chat completion, embedding, and
Responses requests.

## Prompting Intent
The engineer asked why PR #2656 only showed ExtendedProperties and requested
that all three Fabric workload headers be owned and emitted together.

## Linked Sources
- Pull request: #2656
- Repair work item: https://dev.azure.com/msdata/A365/_workitems/edit/5520317
- Fabric taxonomy and class-of-service guide: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- AI Functions draft PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680

## Rationale
SynapseML is the common owner of implicit Fabric OpenAI requests, so keeping
Background/flex classification beside feature/runtime attribution avoids
partial metadata and inconsistent behavior across OpenAI stages. All three
headers use the same Fabric-only guard and case-insensitive ownership rules.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
Rana Singh (ranadeepsingh) added a commit that referenced this pull request Aug 19, 2026
* Report versioned Fabric runtime in OpenAI metadata

AB#5533937

## Summary
Add a cached Fabric runtime identity to PlatformDetails and use it in SynapseML OpenAI extended properties. Fabric requests now report fabric_spark_<spark_version>, fall back to fabric_python_<python_version> when Spark is unavailable, and finally use fabric.

## Prompting Intent
The engineer asked for a new SynapseML follow-up PR that replaces the generic runtime value in Fabric LLM taxonomy metadata with versioned Spark or Python runtime attribution and ensures detection is performed only once.

## Linked Sources
- Work item: https://dev.azure.com/msdata/A365/_workitems/edit/5533937
- Prior header PR: #2656
- Fabric taxonomy guidance: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html

## Rationale
Place runtime detection in shared PlatformDetails rather than the OpenAI header trait so the taxonomy value has one owner. A lazy value guarantees one-time process detection. Spark version is authoritative for SynapseML JVM execution; an environment or JVM Python version remains available as a defensive fallback before the generic fabric value.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c

* Align and cache Fabric runtime header metadata

AB#5533937

## Summary
Align SynapseML runtime resolution exactly with SynapseML-Internal and initialize the complete fixed Fabric LLM classification header map once per JVM. Reuse that immutable map across OpenAI request rows while preserving request-specific custom-header merging.

## Prompting Intent
The engineer asked to make the SynapseML follow-up use the same runtime algorithm as SynapseML-Internal and ensure all runtime-stable headers are initialized once rather than rebuilt for repeated requests.

## Linked Sources
- Work item: https://dev.azure.com/msdata/A365/_workitems/edit/5533937
- Pull request: #2665
- Internal AI Functions PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680
- Fabric guidance: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html

## Rationale
A JVM-wide lazy immutable map avoids repeated JSON serialization and classification-map allocation. Headers are still attached to every outbound request, as required by HTTP, while only caller-specific merging remains per request. Matching the internal resolver removes the extra JVM property fallback and keeps both codebases behaviorally identical.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c

* Use unknown runtime outside Fabric

AB#5533937

## Summary
Return `unknown` from SynapseML Fabric runtime metadata when Fabric detection is false, while retaining versioned Spark and Python runtime values on Fabric.

## Prompting Intent
The engineer clarified that SynapseML can run on Databricks or locally and requested an unknown runtime when the Synapse-internal/Fabric helper returns false. Keep the public and internal implementations aligned.

## Linked Sources
- Work item: https://dev.azure.com/msdata/A365/_workitems/edit/5533937
- Pull request: #2665
- Internal AI Functions PR: https://dev.azure.com/msdata/A365/_git/SynapseML-Internal/pullrequest/2253680

## Rationale
The taxonomy runtime field is intended to describe Fabric execution. Mapping non-Fabric platforms such as Databricks into that field would create misleading categories, so a stable `unknown` fallback is clearer and consistent across implementations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c

* Fix Fabric runtime review findings

AB#5533937

## Summary
Guard Spark version lookup so the Python/Fabric fallback remains safe when Spark linkage is unavailable, and rename cached header fields to satisfy SynapseML Scala style rules.

## Prompting Intent
Run the SynapseML PR readiness loop, address every current-head review finding, and make all required validation checks pass.

## Linked Sources
- Pull request: #2665
- Review thread: #2665 (comment)
- Work item: https://dev.azure.com/msdata/A365/_workitems/edit/5533937

## Rationale
Catching Spark linkage failure at the version lookup preserves the documented fallback without changing the normal Spark-first path. Renaming object fields fixes the CI style failure while retaining one-time immutable header initialization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c

* Clarify canonical Fabric header capitalization

AB#5533937

## Summary
Inline the canonical Fabric LLM taxonomy and service-tier wire names where the cached SynapseML header map is built.

## Prompting Intent
The engineer asked to review all related repositories and PRs for exact header capitalization, calling out SynapseML PR #2665 as misleading or incorrect.

## Linked Sources
- Fabric taxonomy and class-of-service guidance: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- SynapseML PR: #2665
- Work item: https://dev.azure.com/msdata/A365/_workitems/edit/5533937

## Rationale
The emitted wire names already matched the documented contract. Inlining the exact literals removes confusion caused by Scala object-field capitalization while retaining JVM-wide cached header construction and making review against the specification direct.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c

* Match Fabric service-tier header capitalization

AB#5533937

## Summary
Emit the Fabric LLM service-tier header as `X-Llm-Service-Tier` and update the exact-casing regression test.

## Prompting Intent
The engineer clarified that the Fabric documentation requires `X-Llm-Service-Tier` and asked for consistent capitalization across SynapseML, SynapseML-Internal, and workload-ml.

## Linked Sources
- Fabric taxonomy and class-of-service guidance: https://eng.ms/docs/synapse-data-science-fabric-product-synapse-data-science/llmendpoint/partnerdocs/taxonomyandclassofservice.html
- SynapseML PR: #2665
- Work item: https://dev.azure.com/msdata/A365/_workitems/edit/5533937

## Rationale
Although HTTP header lookup is case-insensitive, emitting the documented spelling keeps telemetry, diagnostics, tests, and code review aligned with the Fabric contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c

---------

Co-authored-by: SynapseML CI <synapseml-ci@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d835d0c8-9ce7-4f84-99a6-a7c87b24058c
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.

2 participants