Skip to content

feat: default OpenAI text stages to gpt-6-luna and add prompt caching - #2781

Open
Rana Singh (ranadeepsingh) wants to merge 15 commits into
microsoft:masterfrom
ranadeepsingh:copilot/openai-luna-defaults
Open

Rana Singh (ranadeepsingh) wants to merge 15 commits into
microsoft:masterfrom
ranadeepsingh:copilot/openai-luna-defaults

Conversation

@ranadeepsingh

@ranadeepsingh Rana Singh (ranadeepsingh) commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Why this change

SynapseML's OpenAI text transformers currently require callers to select a deployment, and DataFrame workloads cannot express the new prompt-cache options and input breakpoints. This makes it harder to use gpt-6-luna by default or configure caching for repeated instructions and reference material. Missing cache-write accounting and incorrectly forwarded inference controls also make it difficult to understand cache behavior or reliably configure requests.

This PR defaults OpenAIChatCompletion, OpenAIResponses, and OpenAIPrompt to gpt-6-luna only when the deployment is unset, and adds typed cache options and object-valued input breakpoints. Explicit scalar, column, and global deployments still win; supported Prompt model aliases, embedding models, and Foundry model selection are preserved. No deployment is created or changed.

The notebook includes native SDK and SynapseML examples, explicit and implicit caching, separate cache-read/write usage, prewarming, diagnostics, and the supported inference controls. The service controls eligibility, modes, and lifetimes; cache hits and savings are not guaranteed.

Current text-generation examples use gpt-6-luna, with gpt-6.1-sol documented as the larger-model alternative for document question answering. The remaining older GPT example has been migrated. Archived release documentation and embedding models are intentionally unchanged.

Cache and inference-control audit

The audit found and fixed client-side gaps; it did not establish that every hosted deployment supports every cache option.

Area Fix
Cache requests Added scalar/column promptCacheKey and the separate legacy promptCacheRetention control. Existing request options and ordered breakpoint objects retain mixed TTLs and comparison IDs.
Cache accounting Raw outputs and Prompt usage now retain cache_write_tokens; Responses also retains the ttl_30m_tokens / ttl_12h_tokens breakdown. Reads and writes stay distinct, and absent counters remain null.
Diagnostics and prewarming Responses retains applied options and cache diagnostics. A completed prewarm with empty output returns null Prompt text without a false content-filter error; usage and stored IDs are retained.
Log probabilities Fixed Chat's integer-to-boolean wire mismatch. Added logProbsEnabled / topLogProbs; the legacy integer logProbs API remains usable. Responses requests the corresponding include data, and raw schemas retain the returned probabilities.
Other controls Added serviceTier, safetyIdentifier, metadata, Responses reasoning / include / truncation, and Chat logitBias / stopSequences. Chat storage now works through Prompt, including per-row settings and response IDs.
Explicit choices Responses no longer silently drops temperature / top_p based on a model-name heuristic. Conflicting controls and known unsupported API-specific parameters fail explicitly. Model-specific limits remain provider-validated.

Generated Python constructors, setParams, column overrides, copy and save/load are covered through the real JVM/HTTP path. Additive wire schemas preserve public case-class constructors and legacy usage mappings.

Follow-up review fixes

The four open findings exposed request failures and compatibility regressions:

  • Responses log probabilities now use the SDK-supported message.output_text.logprobs selector, including deduplication and conflict detection.
  • Saved Foundry prompts retain the no-storage default. Explicit store=false is also a no-op; actual storage requests remain unsupported on that route.
  • Per-row storage flags are read before output or usage columns replace them. True, false and null flags work even when their input column becomes the output, usage or response-ID column, with matching runtime and declared schemas.
  • Custom usage mappings again treat dotted keys as literal field names. Responses TTL accounting uses explicit nested paths without changing the public mapping constructor or normalization signature. The newly introduced detailed Responses mapping is package-internal, alongside its nested-field normalizer, rather than exposed as an incompatible option for the generic public normalizer.

Boundary: local HTTP captures prove serialization and response handling. Separate live qualification below now establishes cache reads and write accounting on the tested deployment, but not universal provider support, prewarm effectiveness or cost savings. Streaming, tool orchestration, background polling, arbitrary conversation items, audio output and prediction remain outside these synchronous text transformers.

GPT-6 options and cache breakpoints: end-to-end flow

Yes: both the request-level options and nested cache breakpoint objects reach the HTTP request. The API field is prompt_cache_breakpoint (not a Spark checkpoint). This was verified through installed Python wrappers and real Spark transforms against a loopback HTTP receiver using the exact validated JARs, not just setter/getter assertions.

Python setters + typed DataFrame message content
  -> generated Python wrapper / JVM transformer
  -> ServiceParam resolves scalar values or each row's options column
  -> getOptionalParams maps options to the API's JSON fields
  -> message encoder validates and preserves nested breakpoint objects
  -> prepareEntity + request-body encoder produce application/json
  -> POST /openai/v1/responses or /openai/v1/chat/completions
  -> response/error columns and the API's cached-token usage
Input Responses JSON Chat Completions JSON
setPromptCacheOptions({"mode": "explicit", "ttl": "30m"}) Top-level prompt_cache_options object Same
setPromptCacheOptionsCol("options") Per-row prompt_cache_options; replaces the scalar binding Same
Content-part prompt_cache_breakpoint={"mode": "explicit"} input[].content[].prompt_cache_breakpoint object messages[].content[].prompt_cache_breakpoint object
setReasoningEffort("low") reasoning.effort reasoning_effort
setVerbosity("low") text.verbosity Top-level verbosity
setMaxCompletionTokens(n) max_output_tokens max_completion_tokens

Example: explicit caching on a stable prefix

Using rows, endpoint and key from the complete runnable example below:

stage = (
    OpenAIResponses()
    .setUrl(endpoint)
    .setSubscriptionKey(key)
    .setMessagesCol("messages")
    .setPromptCacheOptions({"mode": "explicit", "ttl": "30m"})
    .setReasoningEffort("low")
    .setVerbosity("low")
    .setOutputCol("response")
    .setErrorCol("error")
)
result = stage.transform(rows)

With no deployment override or global deployment configured, the outgoing v1 request selects gpt-6-luna. Put the breakpoint on the stable developer-message content, before the changing user question. The captured Responses request body is shown below with only the long catalog text abbreviated:

{
  "prompt_cache_options": {
    "mode": "explicit",
    "ttl": "30m"
  },
  "model": "gpt-6-luna",
  "store": false,
  "text": {
    "verbosity": "low"
  },
  "reasoning": {
    "effort": "low"
  },
  "input": [
    {
      "role": "developer",
      "content": [
        {
          "type": "input_text",
          "text": "<stable product catalog prefix; abbreviated here>",
          "prompt_cache_breakpoint": {
            "mode": "explicit"
          }
        }
      ]
    },
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "What is Product 17's warranty?"
        }
      ]
    }
  ]
}

The equivalent Chat request uses messages, content type text, top-level reasoning_effort and verbosity; the two cache fields remain JSON objects in the same relative positions. Unset options or a null options-column value omit the top-level field. Explicit null members inside an options object remain JSON null. A null breakpoint is omitted; a non-null scalar/string breakpoint is rejected locally into the error column rather than sent as a quoted JSON string.

Important boundary: OpenAIPrompt forwards request-level options to its selected Chat/Responses stage, but ordinary prompt templates do not create explicit breakpoint markers. Use implicit mode for those templates, or use OpenAIResponses/OpenAIChatCompletion with typed message content for explicit breakpoints. Options alone do not enable explicit cache reads/writes. The provider still decides eligibility and cache use; successful forwarding does not prove a cache hit.

Wire evidence: three public-transform HTTP captures passed: Chat scalar options, Responses scalar options, and Responses column options overriding a scalar value. Each capture verified the model, reasoning/verbosity placement, complete prefix and question, object-valued breakpoint on the prefix, and absence of a breakpoint on the variable question. Those captures were local serialization checks; the separate live evidence below establishes hosted cache reads.

Implementation trace (current source; the captures above were recorded before this audit): shared option mapping, optional parameter collection, Responses option shaping, Responses JSON body, Chat JSON body, and Prompt delegation.

Implementation and compatibility

  • Unset service defaults remain implicit after save/load, while explicit service values and ordinary saved defaults retain their existing semantics. Saved output-column names remain stable across Scala/Python loading and pipelines.
  • Java/Scala decimals and SQL decimal option values preserve their exact JSON numbers, including through parameter save/load. Foundry subclasses do not inherit the OpenAI deployment fallback.
  • Prompt schema validation resolves globals on a temporary copy. Schema-only calls and JVM Pipeline.fit neither freeze global settings nor materialize global credentials on the original stage for later persistence.
  • Model-only Prompt configurations on ordinary legacy Azure Chat endpoints fail with deployment/v1 guidance instead of silently choosing a fallback. Existing custom-URL behavior, explicit deployments, v1 model aliases, Responses, and Foundry routes remain supported.
  • Invalid breakpoint shapes fail locally through the error column. Fabric's existing model-availability preflight retains its failure behavior and adds conditional guidance about the OpenAI-as-a-Microsoft-Subprocessor setting.

Validation

Live cache qualification (2026-11-09)

Using the published revision's rebuilt JARs and installed Python wrappers, synthetic prefixes were sent to an existing Azure OpenAI deployment and the separate Foundry model-inference route. Each successful case asserted error-free responses and positive cache reads, rather than relying on displayed output. Interpreter, wrapper origins and JAR hashes were recorded.

Live path Observed result
Azure Chat Completions 1,865 cache-write tokens on the native request; 1,865 cached tokens through SynapseML
Responses scalar options and copy 1,866 written, then 1,866 cached
Responses per-row 30m / 12h 1,862 / 1,864 written under the corresponding TTL counters, then the same positive cache reads; disjoint write counts sum correctly
Implicit Responses through saved/reloaded OpenAIPrompt 1,872 written, then 1,872 cached; normalized TTL accounting preserved
Foundry model inference with gpt-6-luna 1,868 written natively, then 1,868 cached in both SynapseML requests
Notebook explicit scalar, explicit column and implicit Prompt examples All six rows passed new assertions with 4,101 cached tokens each
Untouched 30-minute interval Follow-up completed 30m 44s after the seed: 0 cached tokens and 1,865 new 30-minute write tokens, with no request error; the positive-reuse assertion failed

Remaining qualification gaps: the tested Azure endpoint rejects prompt_cache_options.prewarm with HTTP 400, both natively and through SynapseML, including prewarm=false. The existing Foundry Llama deployment completes inference but reports no cache counters, so its caching is unverified, not passed. Low-level OpenAIResponses save/load hits the Java-UDF deserialization guard even without cache options; the unsafe override was not enabled. The successful persistence case above is specifically OpenAIPrompt, not every transformer.

12h acceptance and accounting do not prove 12 hours of retention. The timed check made no intervening requests and did not establish reuse beyond 30 minutes. Since the follow-up occurred after the requested minimum lifetime, its miss is not proof of a TTL violation. TTL is a minimum lifetime, not a deletion deadline. Foundry qualification uses matching default reasoning settings; it does not qualify every inherited inference-control setter. No cache-hit rate, latency or cost-saving guarantee is claimed.

The new opt-in test module and notebook assertions are local, uncommitted follow-up changes, not part of published commit b51b396704 or its CI run. The modified notebook's cache cells were executed live with OpenAI Python SDK 3.46.0. Provider limitations remain visible as failed qualification cases rather than being suppressed.

Current revision: b51b396704 makes only the new detailed Responses mapping package-internal. Four usage-normalizer tests and the Prompt TTL-accounting regression passed on this revision, along with production/test Scala style and cognitive JAR packaging. Existing public mappings and custom literal-key behavior are unchanged.

Preceding review-fix revision (historical full runtime validation): 880f483bf7. All four reported regressions were demonstrated before the fixes. 76 Scala tests passed; the three affected Foundry tests passed again after an equivalent style simplification (not additional tests). Freshly rebuilt and installed packages passed 28 Python tests and 28 subtests, plus seven loopback HTTP transforms. Production/test Scala style, changed Python formatting, wrapper generation and notebook structure checks passed. These results establish local request, persistence and schema behavior, not hosted cache performance.

Earlier rebase validation (historical):

Rebased onto current master: 2570bc2749 incorporates master 6c2699defc. All 12 original commits retain their authors and messages. Two test-only conflicts were resolved by keeping both sets of regressions. A small follow-up moves unchanged HTTP fixture code into a test base and removes two production blank lines to retain the existing file-length limits.

  • Scala integration: 76 core and 69 OpenAI tests passed, covering code generation, assigned-session persistence, global parameters, HTTP response cleanup, cancellation, cache controls and defaults. After the fixture move, all 31 tests in the affected multimodal suite passed again; that rerun overlaps the 69 tests.
  • Python integration: freshly rebuilt core and cognitive packages passed 28 tests and 28 subtests, plus seven loopback HTTP transforms. Installed wrapper origins and rebuilt JAR hashes were recorded.
  • Build/style: core and cognitive production/test style checks, JAR packaging and wrapper generation passed. The fixture move preserves every test body and assertion.
  • Boundary: these are local checks on Python 3.11.8, Spark/PySpark 3.5.0, Scala 2.12.18 and Java 11. These rebase results are historical; they do not establish hosted cache behavior.

Review and CI status

Current-revision Azure CI succeeded for merge abd8fdc0d29bb92fa704ae0537fd2479b9b5ad08, with verified parents target 6c2699defc and head b51b396704, after the authorized run. The authorized CPU-3 and geospatial retries both succeeded. Final collection found 215 of 215 selected current-attempt results passing, including all five named review regressions, OpenAI.ipynb and HyperOpt.ipynb. No code, timeout, workflow or approval changes were made to obtain the retries. The original observation window expired; terminal results were reconciled later without restarting it.

Strict evidence remains blocked: successful jobs still contain telemetry/TLS, low-disk and missing-coverage warnings, plus dependency-scan alerts requiring assessment. The collector therefore does not report a passing automatic whole-build gate. The two documented fork-excluded jobs remain intentionally skipped.

Fast checks and review: the dead-links check passed on its one authorized retry. All five reported findings are fixed, answered and resolved. Copilot's current-head review returned a service error rather than a substantive review; its one replacement request timed out without a new review. That is not a clean-review verdict. The preceding canceled/deleted build does not qualify this head.

The owner explicitly approved publishing this locally validated patch for human review without completing the six-lens pre-commit gate. The earlier full-patch broad-sweep review was clean; the next lens was stopped at the owner's request and the remaining lenses were not run. This cache-audit follow-up has not restarted that review cycle. Earlier clean reviews do not qualify this revision. Review evidence and the exception are recorded in the branch.

Azure validation of the preceding revision succeeded: the authorized /azp run comment queued a PR-triggered run, not a manual build. Its merge commit 5b78eb57c8b90a52ebd18dd2ac7dee7207c8ed31 has target d3f3af6bd3e4b7d191f51c9eb29f9aeffe788193 and previous PR head 73f9c93e54b20ddb05f68cd6d09a949de28ec244 as its verified ordered parents. The owner approved a one-time exception to the workflow's reviewed-SHA trigger safeguard; no pipeline settings, permissions, platform approvals or coverage conditions were changed.

The published current-attempt results include 155 selected passing regressions across ten Scala suites and three named Python tests. These cover defaults, explicit bindings, request shaping, breakpoint forwarding, decimal persistence and Python save/load. Coverage reports were published to Azure, and Codecov accepted the upload for that tested revision. Publication is confirmed; no Codecov patch-coverage threshold result is claimed.

Cache-audit amendment before this rebase: 276b80e92b contains the request, schema, accounting, prewarm and inference-control fixes summarized above. The preceding documentation amendment selected gpt-6-luna / gpt-6.1-sol; embedding configuration and archived docs remain unchanged. Earlier CI on 73f9c93e54 remains historical. Current notebook execution and bounded live cache results are documented above; final review remains unverified.

Not merge-ready: human approval, a substantive current-head review, warning dispositions and the stated provider/persistence qualification gaps remain unresolved. A successful CI status does not clear these separate gates. The stopped six-lens review cycle has not been restarted; no merge or release is authorized.

Notebook walkthrough, SDK/SynapseML examples, and API mapping

What the notebook demonstrates

  • A stable, substantial developer-message prefix followed by changing questions.
  • Explicit request-level options and prompt_cache_breakpoint inside actual input content—not merely an options column.
  • Scalar options, row-bound options, and an implicit-caching OpenAIPrompt example.
  • Native OpenAI Python SDK and SynapseML requests, provider errors, and cached-token usage.

OpenAI documentation

Python SDK versus SynapseML

Run these snippets in order with a Spark session, a SynapseML build containing this change, and the OpenAI SDK installed. Set OPENAI_BASE_URL to your Azure OpenAI v1 URL ending in /openai/v1/, OPENAI_API_KEY to your key, and OPENAI_DEPLOYMENT to your chosen deployment. No deployment is created or changed.

Shared input and options

import os

endpoint = os.environ["OPENAI_BASE_URL"]
key = os.environ["OPENAI_API_KEY"]
deployment = os.environ["OPENAI_DEPLOYMENT"]
options = {"mode": "explicit", "ttl": "30m"}
prefix = "Answer using this product catalog.\n" + "\n".join(
    f"Product {n}: warranty {1 + n % 3} years; returns within 30 days with a receipt. "
    "Report shipping damage within seven days; repairs require a serial number."
    for n in range(1, 81)
)
messages = [
    {
        "role": "developer",
        "content": [{
            "type": "input_text",
            "text": prefix,
            "prompt_cache_breakpoint": {"mode": "explicit"},
        }],
    },
    {
        "role": "user",
        "content": [{"type": "input_text", "text": "What is Product 17's warranty?"}],
    },
]

OpenAI Python SDK

from openai import OpenAI

with OpenAI(api_key=key, base_url=endpoint) as client:
    response = client.responses.create(
        model=deployment,
        input=messages,
        prompt_cache_options=options,
        reasoning={"effort": "low"},
        text={"verbosity": "low"},
        store=False,
    )
print(response.output_text)
print(response.usage.input_tokens_details.cached_tokens)

SynapseML

from pyspark.sql import SparkSession
from synapse.ml.services.openai import OpenAIResponses

spark = SparkSession.builder.getOrCreate()
schema = (
    "messages array<struct<role:string,content:array<struct<type:string,text:string,"
    "prompt_cache_breakpoint:map<string,string>>>>>"
)
rows = spark.createDataFrame([(messages,)], schema)
transformer = (
    OpenAIResponses()
    .setUrl(endpoint)
    .setSubscriptionKey(key)
    .setDeploymentName(deployment)
    .setMessagesCol("messages")
    .setPromptCacheOptions(options)
    .setReasoningEffort("low")
    .setVerbosity("low")
    .setOutputCol("response")
    .setErrorCol("error")
)
transformer.transform(rows).select(
    "response.output", "response.usage.input_tokens_details.cached_tokens", "error"
).show(truncate=False)

Mapping and behavior

OpenAI field SynapseML surface
Top-level prompt_cache_options setPromptCacheOptions(dict) or setPromptCacheOptionsCol(column)
Responses input OpenAIResponses.setMessagesCol(column)
input[].content[].prompt_cache_breakpoint The same nested DataFrame field on existing input_text, input_image, or input_file content
Chat messages[].content[].prompt_cache_breakpoint The same field on supported Chat content; text uses type="text"
Responses cached tokens response.usage.input_tokens_details.cached_tokens
Chat cached tokens response.usage.prompt_tokens_details.cached_tokens
OpenAIPrompt normalized usage column usage.input_token_details["cached_tokens"] for either API; this is a map, unlike the raw response structs

An unset parameter or null options-column value omits the field, preserving service defaults. Selecting the column binding replaces the scalar binding. JSON values, including booleans, retain their types. Explicit null object members remain JSON null, distinct from absent keys. Breakpoint values must be objects in nested struct content; legacy string-valued content maps cannot represent a breakpoint object. Use a Spark struct column for mixed string/Boolean objects; string-valued maps are sufficient for mode and ttl. The inherited Foundry serialization path also forwards the option rather than silently dropping it.

Explicit mode needs input breakpoints; options alone do not enable explicit cache reads or writes. Top-level Responses instructions cannot hold a breakpoint, which is why the example uses developer-message content. Ordinary OpenAIPrompt templates do not insert markers; its notebook example therefore uses implicit mode.

Keep the reusable prefix stable and place variable input after it. The service decides eligibility and support; cache hits, latency improvements, and savings are not guaranteed. The inline snippets in this description are illustrative. The local notebook follow-up now asserts positive cached-token counts, with live results documented above.

The examples use 30m and a mode-only breakpoint. The guide documents additional Responses lifetime behavior, while some generated references and provider deployments differ. SynapseML forwards serializable values and exposes provider errors through the error column; it does not enforce a 30m-only rule. prompt_cache_options.ttl is not translated into the older prompt_cache_retention policy. Raw and normalized usage now expose cached_tokens and cache_write_tokens separately. Responses additionally preserves the write breakdown in cache_write_tokens_details.ttl_30m_tokens and cache_write_tokens_details.ttl_12h_tokens; these dotted names are the keys in Prompt's normalized input-details map. Missing counters remain null.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 19:47
@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.

Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Oct 21, 2026
## Summary
Move the six qualifying pre-commit review artifacts into reviews/pr-2781
without changing their bytes, and add an old-to-new path/hash index.

## Prompting Intent
Publish the reviewed change with durable, public-safe evidence in the actual
numbered PR directory. Preserve historical feedback and privacy exclusions
without recursively reviewing review text.

## Linked Sources
- microsoft#2781
- reviews/pr-2781/index.md

## Rationale
The initial public commit retains the original artifact paths. The migration
index makes their provenance and unchanged bytes explicit, while recording
current validation and the still-pending remote CI/final review gates.
Only allocated review evidence changes; the reviewed product manifest is
unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
@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.

🔵 Needs a closer look

Current-head service-backed CI, branch-pinned Python validation, and final CI-qualified review remain pending.

No open issues 🎉

What changed in this PR

Adds opt-in prompt-cache controls to SynapseML’s OpenAI transformers while preserving provider defaults and caller-selected deployments.

Changes:

  • Adds validated scalar/per-row cache options, serializer forwarding, and persistence coverage.
  • Updates current examples and test selections to gpt-6-luna.
  • Adds conditional Fabric administrator guidance and records validation evidence.
File Description
reviews/​pre-pr-luna-defaults-cache/​task-unknown-attempt-2-stage-attempt-1-review-6-gpt-6.1-sol.md Records hardening review and validation limitations.
reviews/​pre-pr-luna-defaults-cache/​task-unknown-attempt-2-stage-attempt-1-review-5-gpt-6.1-sol.md Records test-coverage review.
reviews/​pre-pr-luna-defaults-cache/​task-unknown-attempt-2-stage-attempt-1-review-4-gpt-6.1-sol.md Records correctness review.
reviews/​pre-pr-luna-defaults-cache/​task-unknown-attempt-2-stage-attempt-1-review-3-gpt-6.1-sol.md Records robustness review.
reviews/​pre-pr-luna-defaults-cache/​task-unknown-attempt-2-stage-attempt-1-review-2-gpt-6.1-sol.md Records architecture review.
reviews/​pre-pr-luna-defaults-cache/​task-unknown-attempt-2-stage-attempt-1-review-1-gpt-6.1-sol.md Records initial source review.
docs/​Explore Algorithms/​OpenAI/​Quickstart - Understand and Search Forms.ipynb Updates example deployment.
docs/​Explore Algorithms/​OpenAI/​Quickstart - Multimodal OpenAI Prompter with Responses API.ipynb Updates Responses example deployment.
docs/​Explore Algorithms/​OpenAI/​OpenAI.ipynb Documents caching and updates reasoning examples.
docs/​Explore Algorithms/​OpenAI/​Langchain.ipynb Updates LangChain example deployment.
core/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​fabric/​OpenAIFabricSettingSuite.scala Tests conditional guidance and existing status gates.
core/​src/​main/​scala/​com/​microsoft/​azure/​synapse/​ml/​fabric/​OpenAIFabricSetting.scala Extends missing-model administrator guidance.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIV1EndpointSuite.scala Updates endpoint-test model fixtures.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIResponsesSuite.scala Updates Responses fixtures.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIResponsesMultimodalSuite.scala Updates multimodal Responses fixtures.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIPromptSuite.scala Updates prompt model selections and assertions.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIPromptResponsesSuite.scala Updates live Responses selection and reasoning settings.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIPromptMultimodalRequestSuite.scala Tests Foundry cache forwarding; updates fixtures.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIPromptCacheSuite.scala Tests cache validation, omission, and serialization.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIEmbeddingsSuite.scala Updates non-embedding default fixture.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIChatCompletionSuite.scala Updates chat test selections and fixtures.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIChatCompletionMultimodalSuite.scala Updates multimodal chat fixtures.
cognitive/​src/​test/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIAPIKey.scala Updates shared live-test deployment.
cognitive/​src/​test/​python/​synapsemltest/​services/​test_ServiceParamPythonBridge.py Tests generated cache accessors, copying, and persistence.
cognitive/​src/​test/​python/​synapsemltest/​services/​openai/​test_StructuredOutput.py Updates structured-output deployment.
cognitive/​src/​test/​python/​synapsemltest/​services/​openai/​test_OpenAIResponsesMultimodal.py Updates Responses model fixture.
cognitive/​src/​test/​python/​synapsemltest/​services/​openai/​test_OpenAIMultimodalRequest.py Updates request and response fixtures.
cognitive/​src/​test/​python/​synapsemltest/​services/​openai/​test_OpenAIDefaults.py Updates defaults-test deployment.
cognitive/​src/​test/​python/​synapsemltest/​services/​openai/​test_OpenAIChatCompletionMultimodal.py Updates chat model fixture.
cognitive/​src/​test/​python/​synapsemltest/​services/​langchain/​test_LangchainTransform.py Updates LangChain model fixtures.
cognitive/​src/​main/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIResponses.scala Includes cache options in Responses payloads.
cognitive/​src/​main/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAIChatCompletion.scala Includes cache options in chat payloads.
cognitive/​src/​main/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​openai/​OpenAI.scala Defines cache parameters and shared validation.
cognitive/​src/​main/​scala/​com/​microsoft/​azure/​synapse/​ml/​services/​aifoundry/​AIFoundryChatCompletion.scala Includes cache options in Foundry payloads.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 21, 2026 19:53

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.

🔵 Needs a closer look

Supplied evidence leaves current-head service-backed CI and branch-pinned Python validation pending for the cross-language API changes.

No open issues 🎉

Review effort: Balanced

Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Oct 21, 2026
## Summary
Ask for full-sentence favorite-color answers in three live-test fixtures.
Preserve the existing minimum-length assertions and all production behavior.
Include the complete fresh six-lens pre-commit evidence and integrate the
upstream website lockfile update without rewriting published history.

## Prompting Intent
Diagnose PR microsoft#2781's failed OpenAI tests, preserve completed E2E evidence,
fix the demonstrated cause without weakening tests, and require fresh
engineering validation before final CI-qualified review.

## Linked Sources
- PR and current checks: microsoft#2781
- Target update: microsoft#2780
- Review evidence: reviews/pr-2781/index.md
- Trusted workflow: .github/skills/synapseml-pr-loop/

## Rationale
Luna correctly returned "Red." to a question that permits a short answer.
The tests instead required more than ten characters. Requesting a full sentence
aligns the fixture with that assertion rather than weakening the assertion,
changing deployments, or modifying serializers. All 55 affected live tests
passed locally with one unchanged intentional ignore. The complete frozen
patch passed six sequential independent gpt-6.1-sol/max reviews.
Fresh PR-head CI and final CI-qualified review remain required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
Copilot AI balanced review requested due to automatic review settings October 21, 2026 21:50
@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.

🔵 Needs a closer look

The supplied evidence leaves current-head CI, branch-pinned Python validation, and the final CI-qualified review outstanding for these cross-language, provider-facing changes.

No open issues 🎉

Review effort: Balanced

Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Oct 23, 2026
## Summary
Move the six qualifying pre-commit review artifacts into reviews/pr-2781
without changing their bytes, and add an old-to-new path/hash index.

## Prompting Intent
Publish the reviewed change with durable, public-safe evidence in the actual
numbered PR directory. Preserve historical feedback and privacy exclusions
without recursively reviewing review text.

## Linked Sources
- microsoft#2781
- reviews/pr-2781/index.md

## Rationale
The initial public commit retains the original artifact paths. The migration
index makes their provenance and unchanged bytes explicit, while recording
current validation and the still-pending remote CI/final review gates.
Only allocated review evidence changes; the reviewed product manifest is
unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Oct 23, 2026
## Summary
Ask for full-sentence favorite-color answers in three live-test fixtures.
Preserve the existing minimum-length assertions and all production behavior.
Include the complete fresh six-lens pre-commit evidence and integrate the
upstream website lockfile update without rewriting published history.

## Prompting Intent
Diagnose PR microsoft#2781's failed OpenAI tests, preserve completed E2E evidence,
fix the demonstrated cause without weakening tests, and require fresh
engineering validation before final CI-qualified review.

## Linked Sources
- PR and current checks: microsoft#2781
- Target update: microsoft#2780
- Review evidence: reviews/pr-2781/index.md
- Trusted workflow: .github/skills/synapseml-pr-loop/

## Rationale
Luna correctly returned "Red." to a question that permits a short answer.
The tests instead required more than ten characters. Requesting a full sentence
aligns the fixture with that assertion rather than weakening the assertion,
changing deployments, or modifying serializers. All 55 affected live tests
passed locally with one unchanged intentional ignore. The complete frozen
patch passed six sequential independent gpt-6.1-sol/max reviews.
Fresh PR-head CI and final CI-qualified review remain required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Oct 23, 2026
## Summary
Repair the review archive's commit references after rebasing onto current master
and distinguish successful historical tests from failed coverage publication.
All twelve original review files and the complete reviewed source patch remain
unchanged.

## Prompting Intent
The engineer requested rebasing the personal feature branch onto the latest
target and rerunning CI, while preserving review history, exact source evidence,
privacy boundaries, and the original remote-head lease.

## Linked Sources
- Pull request: microsoft#2781
- Target: microsoft@71346cf
- Review evidence and migration hashes: reviews/pr-2781/index.md
- Trusted loop and evidence retention: .github/skills/synapseml-pr-loop/references/loop-control.md

## Rationale
Keep the original feedback bytes and repaired reachable commit links instead of
rewriting reviews or treating stale CI as current. The historical R tests passed;
their coverage upload failed TLS certificate-name validation. Fresh configured CI
must validate the new head without bypassing coverage, TLS, tests, or review gates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
Copilot AI balanced review requested due to automatic review settings October 23, 2026 07:50
@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.

🔵 Needs a closer look

Supplied evidence does not establish completed current-head CI and final qualification for the cross-service Scala/Python API changes.

No open issues 🎉

Review effort: Balanced

Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Oct 23, 2026
## Summary
Move the six qualifying pre-commit review artifacts into reviews/pr-2781
without changing their bytes, and add an old-to-new path/hash index.

## Prompting Intent
Publish the reviewed change with durable, public-safe evidence in the actual
numbered PR directory. Preserve historical feedback and privacy exclusions
without recursively reviewing review text.

## Linked Sources
- microsoft#2781
- reviews/pr-2781/index.md

## Rationale
The initial public commit retains the original artifact paths. The migration
index makes their provenance and unchanged bytes explicit, while recording
current validation and the still-pending remote CI/final review gates.
Only allocated review evidence changes; the reviewed product manifest is
unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Oct 23, 2026
## Summary
Ask for full-sentence favorite-color answers in three live-test fixtures.
Preserve the existing minimum-length assertions and all production behavior.
Include the complete fresh six-lens pre-commit evidence and integrate the
upstream website lockfile update without rewriting published history.

## Prompting Intent
Diagnose PR microsoft#2781's failed OpenAI tests, preserve completed E2E evidence,
fix the demonstrated cause without weakening tests, and require fresh
engineering validation before final CI-qualified review.

## Linked Sources
- PR and current checks: microsoft#2781
- Target update: microsoft#2780
- Review evidence: reviews/pr-2781/index.md
- Trusted workflow: .github/skills/synapseml-pr-loop/

## Rationale
Luna correctly returned "Red." to a question that permits a short answer.
The tests instead required more than ten characters. Requesting a full sentence
aligns the fixture with that assertion rather than weakening the assertion,
changing deployments, or modifying serializers. All 55 affected live tests
passed locally with one unchanged intentional ignore. The complete frozen
patch passed six sequential independent gpt-6.1-sol/max reviews.
Fresh PR-head CI and final CI-qualified review remain required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a

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.

🔵 Needs a closer look

Shared persistence changes affect models beyond OpenAI, requiring maintainer assessment of backward compatibility and CI evidence because Spark-dependent validation could not be independently reproduced.

No open issues 🎉

Review effort: Balanced

Rana Singh (ranadeepsingh) added a commit to ranadeepsingh/SynapseML that referenced this pull request Nov 8, 2026
## Summary
Expose missing cache keys, retention settings, write counters and diagnostics.
Preserve successful Responses prewarming without reporting a filtering error.
Add typed inference controls and correct Chat log-probability and storage
forwarding, including Python column bindings and Prompt persistence.

## Prompting Intent
Audit whether the new caching mechanism works end to end and fix model
parameters that were missing or incorrectly passed through.

## Linked Sources
- Parent PR: microsoft#2781
- Cache contract: https://developers.openai.com/api/docs/guides/prompt-caching
- Audited SDK types: https://github.com/openai/openai-python/tree/a1175a35ba6aa2d6bf98d26088a572ab0c5f4453/src/openai/types
- Owner's cache and parameter audit request.

## Rationale
Keep cache reads distinct from writes and retain the Responses TTL breakdown.
Use additive wire schemas to preserve public case-class constructors and
legacy usage mappings. Keep explicit sampling settings instead of dropping
them based on model-name heuristics, and reject unsupported or conflicting
API controls rather than silently ignoring them.

Exercise scalar and column settings, save/load, prewarm results and raw
diagnostics through offline Scala and installed Python-to-HTTP regressions.
Document the supported text-inference controls and the remaining boundary:
local HTTP evidence does not establish hosted cache hits or TTL enforcement.
Streaming and tool orchestration remain outside these synchronous stages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8129ea36-8506-40f7-a401-b14bc08e5b30
Copilot AI balanced review requested due to automatic review settings November 8, 2026 14:32

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.

🟡 Changes recommended

An invalid log-probability selector causes Responses validation failures, while saved-and-loaded Foundry prompts forward an unsupported storage default and fail before making HTTP requests.

2 open issues

Review effort: Balanced

## Summary
Add optional prompt cache options to OpenAI Chat Completions, Responses and
OpenAIPrompt, including its Foundry delegate. Update active text-generation
examples and test selections to gpt-6-luna, and make the existing Fabric
missing-model error offer conditional administrator guidance.

## Prompting Intent
Expose strict optional mode/TTL controls through Scala and generated Python
map/column bindings. Preserve caller-selected deployments, embedding models,
historical documentation and deliberate offline compatibility tests. Do not
introduce a generic transformer model default or automatic cache breakpoints.

## Linked Sources
- User-requested cache controls, active Luna selections, and model-availability guidance.
- https://developers.openai.com/api/docs/guides/prompt-caching
- https://learn.microsoft.com/en-us/fabric/admin/service-admin-portal-copilot
- reviews/pre-pr-luna-defaults-cache/: six independent pre-commit review artifacts.

## Rationale
Reuse ServiceParam serialization and generated wrappers rather than adding a
parallel Python API. Validate both scalar and row-bound options before request
serialization. Preserve the existing Fabric availability gate and add only
conditional advice. A Foundry forwarding regression found during review is
covered by request-level and public-transform tests.

Local compilation/style checks, targeted Scala tests, notebook/Black checks,
and fresh generated-wrapper tests passed. Exact branch Python and current-head
remote CI remain pending. Public-safe review artifacts use the explicitly
authorized temporary pre-PR directory until the real PR number is assigned.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Move the six qualifying pre-commit review artifacts into reviews/pr-2781
without changing their bytes, and add an old-to-new path/hash index.

## Prompting Intent
Publish the reviewed change with durable, public-safe evidence in the actual
numbered PR directory. Preserve historical feedback and privacy exclusions
without recursively reviewing review text.

## Linked Sources
- microsoft#2781
- reviews/pr-2781/index.md

## Rationale
The initial public commit retains the original artifact paths. The migration
index makes their provenance and unchanged bytes explicit, while recording
current validation and the still-pending remote CI/final review gates.
Only allocated review evidence changes; the reviewed product manifest is
unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Ask for full-sentence favorite-color answers in three live-test fixtures.
Preserve the existing minimum-length assertions and all production behavior.
Include the complete fresh six-lens pre-commit evidence and integrate the
upstream website lockfile update without rewriting published history.

## Prompting Intent
Diagnose PR microsoft#2781's failed OpenAI tests, preserve completed E2E evidence,
fix the demonstrated cause without weakening tests, and require fresh
engineering validation before final CI-qualified review.

## Linked Sources
- PR and current checks: microsoft#2781
- Target update: microsoft#2780
- Review evidence: reviews/pr-2781/index.md
- Trusted workflow: .github/skills/synapseml-pr-loop/

## Rationale
Luna correctly returned "Red." to a question that permits a short answer.
The tests instead required more than ten characters. Requesting a full sentence
aligns the fixture with that assertion rather than weakening the assertion,
changing deployments, or modifying serializers. All 55 affected live tests
passed locally with one unchanged intentional ignore. The complete frozen
patch passed six sequential independent gpt-6.1-sol/max reviews.
Fresh PR-head CI and final CI-qualified review remain required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Repair the review archive's commit references after rebasing onto current master
and distinguish successful historical tests from failed coverage publication.
All twelve original review files and the complete reviewed source patch remain
unchanged.

## Prompting Intent
The engineer requested rebasing the personal feature branch onto the latest
target and rerunning CI, while preserving review history, exact source evidence,
privacy boundaries, and the original remote-head lease.

## Linked Sources
- Pull request: microsoft#2781
- Target: microsoft@71346cf
- Review evidence and migration hashes: reviews/pr-2781/index.md
- Trusted loop and evidence retention: .github/skills/synapseml-pr-loop/references/loop-control.md

## Rationale
Keep the original feedback bytes and repaired reachable commit links instead of
rewriting reviews or treating stale CI as current. The historical R tests passed;
their coverage upload failed TLS certificate-name validation. Fresh configured CI
must validate the new head without bypassing coverage, TLS, tests, or review gates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Keep the initial migration focused on explicit gpt-6-luna selections in current
examples and live test fixtures, necessary fixture compatibility, and conditional
Fabric model-availability advice. Restore the new cache-related production and
bridge changes to the target baseline, remove the added cache-only tests and
documentation, and retain all prior public review evidence.

## Prompting Intent
The engineer requested a lean initial Luna migration with all new prompt-cache
controls deferred to a later follow-up. Preserve existing caching behavior,
caller-selected deployments, embeddings, legacy compatibility cases, historical
documentation and generic transformer defaults. Preserve the exact deferred
implementation and prior artifacts; do not invent a release or alter policies,
deployments, tenant settings, approvals or merge state.

## Linked Sources
- Pull request: microsoft#2781
- Current source review: reviews/pr-2781/task-unknown-attempt-4-stage-attempt-1-review-6-gpt-6.1-sol.md
- Retained review history and migration accounting: reviews/pr-2781/index.md
- Public repository workflow: .github/skills/synapseml-pr-loop/SKILL.md

## Rationale
The model migration does not require a new caching API or dependency release.
Restoring the existing cognitive API preserves its established behavior and
avoids coupling initial migration delivery to the deferred feature. Prior
implementation bytes and candidate artifacts remain preserved separately, and
all earlier public reviewer responses remain intact.

## Validation
Four compilation scopes, four Scala style scopes, 60 offline Scala tests,
55 live Scala tests, 23 installed Python bridge tests plus six subtests,
Black on six changed Python files, four notebook structural checks and both
code-generation tasks passed. One existing Custom EndPoint test remains
intentionally ignored. Six sequential independent gpt-6.1-sol/max pre-commit
reviews are clean. Local Python3.12.3 and bundled Scala2.12.18 are not exact
matches for target Python3.11.8 and build Scala2.12.17.

The frozen23-path patch is independently byte-identical when applied to the
latest website-only target update. Branch integration, fresh current-head CI
and automated review, and the separate final CI-qualified review remain pending.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Repair archival review links after rebasing the model-only migration onto
latest master, and distinguish passed historical tests from failed coverage
publication and still-required fresh narrowed-head validation.

## Prompting Intent
Deliver only the Luna model migration and necessary compatibility guidance,
defer new prompt-cache controls, preserve review originals, integrate latest
master under the explicit ownership guard, and rerun current-head CI.

## Linked Sources
- Public PR: microsoft#2781
- Review evidence: reviews/pr-2781/index.md
- Trusted workflow: .github/skills/synapseml-pr-loop/SKILL.md
- Trusted retention and CI contracts: .github/skills/synapseml-pr-loop/references/loop-control.md and ci-evidence.md
- Historical pipeline: https://dev.azure.com/microsoft/SynapseML/_build/results?buildId=242356862

## Rationale
The latest target changes only website files. The full 23-path source patch,
canonical manifest, and every earlier review artifact are unchanged. Keep
content review evidence, but require fresh SHA-bound CI and the separate final
review. Preserve all history rather than squash or rewrite original feedback.
This documentation-only provenance update deliberately excludes private
tracking identifiers under the publication confidentiality requirement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Let DataFrame callers express OpenAI prompt caching through request-level
options and actual input-content breakpoints. Add executable native Python
SDK and SynapseML examples while preserving the existing Luna migration.

## Prompting Intent
Demonstrate explicit options, input breakpoints and row-bound configuration
in the existing notebook. Preserve serializable values, let the provider
validate cache policy, and explain defaults, usage and nonguaranteed hits.
Keep deployment choice, existing compatibility behavior and package pins.

## Linked Sources
- Pull request: microsoft#2781
- Caching guide: https://developers.openai.com/api/docs/guides/prompt-caching
- Responses API: https://developers.openai.com/api/reference/resources/responses/methods/create
- Chat API: https://developers.openai.com/api/reference/resources/chat
- Python SDK: https://developers.openai.com/api/docs/libraries
- Verified request types: https://github.com/openai/openai-python/blob/81792ff040a2ca2b70348163049d3d69d5ba95cf/src/openai/types/responses/response_create_params.py
- Review evidence and finding resolution: reviews/pr-2781/

## Rationale
Use the existing ServiceParam scalar/column abstraction rather than adding
a separate configuration hierarchy or a model/mode/TTL whitelist. Normalize
nested Spark structs only for cache options so mixed JSON types survive
without changing unrelated serializers. Retain focused before/after HTTP,
wrapper and persistence tests and all review evidence.

Local gates passed: 69 Scala tests, 25 Python tests plus 12 subtests, styles,
Black, generated artifacts and exact notebook mock/live examples. Six
independent precommit lenses are clean. Current-head CI and final review
remain required; no release or merge is performed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Correct the review index so readers see the cache-refined source, pass-5
finding and resolution, and the complete clean pass-6 evidence first.
Record the actual failed notebook-style gate and unqualified manual-run
coverage without implying that passing functional tests make CI green.

## Prompting Intent
Address the automated review's stale-index finding, retain earlier feedback,
and distinguish current evidence from historical model-only qualification.
Publish only allocated review metadata under the artifact-only exception.
Do not modify source, reset review budgets, waive checks, or claim readiness.

## Linked Sources
- PR: microsoft#2781
- Finding: microsoft#2781 (comment)
- Reviewed source: microsoft@51343aa
- Current review aggregate: reviews/pr-2781/task-unknown-attempt-6-stage-attempt-1-review-6-gpt-6.1-sol.md
- Finding resolution: reviews/pr-2781/task-unknown-attempt-5-stage-attempt-1-review-5-gpt-6.1-sol.md
- Artifact-only policy: .github/skills/synapseml-pr-loop/references/loop-control.md

## Rationale
Keep the historical sections intact but clearly subordinate to current
scope and evidence. The complete 29-path source manifest is unchanged.
Named CI test proof is separate from the failed style, skipped coverage,
required-check binding and final-review gates. The exhausted source-review
budget remains a blocker, not permission to silently extend the process.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Make scalar cache-option tests distinguish Boolean values from integers across
original, copied and restored stages. Include a Boolean in scalar persistence
coverage and apply the pinned notebook formatter's four equivalent line wraps.
Preserve every prior review and its resolution; include the authorized clean
single-reviewer full-patch precommit evidence.

## Prompting Intent
The engineer requested a narrow correction to the confirmed Boolean assertion
gap while retaining the executable cache tutorial. They explicitly authorized
one Low-tier full-patch review using gpt-6.1-sol/max for this pass only, without
changing the final review contract. Keep secret-bearing CI paused until its
protected reviewed-revision guard is established. Do not change runtime code,
policies, permissions, dependencies or release behavior.

## Linked Sources
- Pull request: microsoft#2781
- Original finding and resolution: reviews/pr-2781/task-unknown-attempt-7-stage-attempt-1-review-5-gpt-6.1-sol.md
- Full-patch review: reviews/pr-2781/task-unknown-attempt-8-review-0-harness.md
- Prompt caching guide: https://developers.openai.com/api/docs/guides/prompt-caching
- Supported CI trigger semantics: https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/github?view=azure-devops#comment-triggers

## Rationale
Dictionary equality accepts True as equal to 1, so identity-sensitive assertions
are necessary to protect the JSON type contract. Real installed wrappers pass
two focused tests and six subtests; injected integer corruption is rejected
for four originals, four copies and one restored stage. Both notebook cells
retain identical executable ASTs, so unchanged production artifacts and prior
live evidence are reused rather than rebuilt. No private work-item identifiers
are included in this public commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4f9a58fc-ce1f-4a73-951d-4794857a150a
## Summary
Default unset OpenAI text deployments to gpt-6-luna while preserving explicit
deployment and model choices. Harden cache parameter serialization, decimal
precision, schema-only global resolution, and legacy custom-URL compatibility.
Include focused Scala/Python regressions and retained review evidence.

## Prompting Intent
Complete the SynapseML Luna-default and prompt-caching work without changing
embedding or Foundry model selection. The owner requested an end to the
extended review cycle and explicitly approved publishing the locally validated
patch with the incomplete pre-commit review gate recorded as an exception.
Publication is for human review, not a declaration of merge readiness.

## Linked Sources
- Public tracking: microsoft#2781
- Prompt caching: https://developers.openai.com/api/docs/guides/prompt-caching
- Responses API: https://developers.openai.com/api/reference/resources/responses/methods/create
- Chat API: https://developers.openai.com/api/reference/resources/chat
- Review findings, resolutions and exception: reviews/pr-2781/index.md

## Rationale
Keep fallback deployment defaults implicit across persistence so later global
configuration can still override them. Resolve schema-only globals on copies
to avoid freezing credentials or model choices. Preserve JSON decimal values
and typed cache objects instead of coercing or silently dropping them.
Retain custom-URL legacy behavior and reject unsupported model-only routing
before execution. The latest broad-sweep review is clean; the remaining
six-lens work and current-head CI are incomplete and explicitly disclosed.
No merge, release, permission change or manual secret-bearing CI run is made.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8129ea36-8506-40f7-a401-b14bc08e5b30
## Summary
Update the remaining PDF question-answering example from GPT-5.1 to
gpt-6-luna and document gpt-6.1-sol as the larger-model alternative.

## Prompting Intent
Use only gpt-6-luna and gpt-6.1-sol in current text-generation examples.
The owner explicitly chose to preserve archived release documentation.

## Linked Sources
- Parent PR and examples: microsoft#2781
- Owner's current-example cleanup request and model-name correction.

## Rationale
Keep both query model settings aligned with the existing Luna examples,
without changing the embedding model, historical documentation, or
backward-compatibility behavior. This is a documentation-only follow-up;
the existing v1 request and low reasoning setting are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8129ea36-8506-40f7-a401-b14bc08e5b30
## Summary
Expose missing cache keys, retention settings, write counters and diagnostics.
Preserve successful Responses prewarming without reporting a filtering error.
Add typed inference controls and correct Chat log-probability and storage
forwarding, including Python column bindings and Prompt persistence.

## Prompting Intent
Audit whether the new caching mechanism works end to end and fix model
parameters that were missing or incorrectly passed through.

## Linked Sources
- Parent PR: microsoft#2781
- Cache contract: https://developers.openai.com/api/docs/guides/prompt-caching
- Audited SDK types: https://github.com/openai/openai-python/tree/a1175a35ba6aa2d6bf98d26088a572ab0c5f4453/src/openai/types
- Owner's cache and parameter audit request.

## Rationale
Keep cache reads distinct from writes and retain the Responses TTL breakdown.
Use additive wire schemas to preserve public case-class constructors and
legacy usage mappings. Keep explicit sampling settings instead of dropping
them based on model-name heuristics, and reject unsupported or conflicting
API controls rather than silently ignoring them.

Exercise scalar and column settings, save/load, prewarm results and raw
diagnostics through offline Scala and installed Python-to-HTTP regressions.
Document the supported text-inference controls and the remaining boundary:
local HTTP evidence does not establish hosted cache hits or TTL enforcement.
Streaming and tool orchestration remain outside these synchronous stages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8129ea36-8506-40f7-a401-b14bc08e5b30
## Summary
Extract the existing loopback HTTP fixture from the combined multimodal
suite and remove two blank lines from OpenAIPrompt. Keep both files within
the existing 800-line style limit after integrating master.

## Prompting Intent
Rebase PR 2781 onto the latest master after the owner's recent merges,
preserving both upstream fixes and the PR's cache and parameter changes.

## Linked Sources
- Rebased PR: microsoft#2781
- Upstream cancellation fix: microsoft#2807
- Owner's request to rebase onto the latest master.

## Rationale
Keep upstream TaskKilledException propagation and all existing PR behavior.
Retain every test and assertion while moving only fixture setup into a test
base. Production changes are whitespace-only; the style gate is not weakened.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8129ea36-8506-40f7-a401-b14bc08e5b30
Copilot AI balanced review requested due to automatic review settings November 9, 2026 01:40

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.

🟡 Changes recommended

Active defects include an unsupported log-probability include value, a compatibility regression in literal-key usage mappings, and storage-flag column collisions that cause analysis failures.

4 open issues

Review effort: Balanced

## Summary
Use the supported Responses log-probability include selector. Preserve
Foundry Prompt's no-storage default after save/load, retain per-row storage
flags when output columns replace their inputs, and restore literal dotted
keys in custom usage mappings.

## Prompting Intent
Address the unresolved comments on PR microsoft#2781 and run CI for the resulting
revision. Preserve the existing cache controls, explicit parameter choices,
public API compatibility and upstream changes.

## Linked Sources
- microsoft#2781 (comment)
- microsoft#2781 (comment)
- microsoft#2781 (comment)
- microsoft#2781 (comment)
- https://github.com/openai/openai-python/blob/a1175a35ba6aa2d6bf98d26088a572ab0c5f4453/src/openai/types/responses/response_includable.py

## Rationale
Treat effective store=false as a no-op on Foundry, rather than relying on
isSet provenance that persistence changes. Actual storage requests remain
unsupported on that route. Capture the original storage flag before result
projections, using resolver-safe scratch naming, and replace schema fields
the same way the runtime replaces columns.

Keep UsageFieldMapping and normalize's public signatures unchanged. Use an
explicit Responses TTL normalizer instead of interpreting dots in every
custom mapping. Update Scala/Python wire assertions and the notebook together.
Regression coverage includes persistence, true/false/null column collisions,
literal dotted keys, include deduplication and conflicting log-probability
settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8129ea36-8506-40f7-a401-b14bc08e5b30
@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.

🟡 Changes recommended

The public ResponsesDetailed mapping fails to normalize Responses usage because dotted keys are treated as literal fields, while nested-path handling is available only through an internal normalizer.

1 open issue
4 resolved since last review

Review effort: Balanced

## Summary
Limit the new ResponsesDetailed usage mapping to the OpenAI package, where
its matching nested-field normalizer is available.

## Prompting Intent
Address the remaining review feedback and run CI for the fixed revision,
without changing established public usage-mapping behavior.

## Linked Sources
- Pull request: microsoft#2781
- Review finding: microsoft#2781 (comment)

## Rationale
The generic public normalizer intentionally interprets dotted keys literally.
Exposing the detailed Responses mapping would suggest that it works with that
normalizer even though its TTL counters require internal nested-field handling.
Keeping the newly introduced mapping internal avoids an unusable public API
without changing existing public mappings, custom-key semantics, or Prompt
cache accounting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8129ea36-8506-40f7-a401-b14bc08e5b30
@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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

This branch has not been deployed

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

3 participants