Repository navigation
feat: default OpenAI text stages to gpt-6-luna and add prompt caching - #2781
Rana Singh (ranadeepsingh) wants to merge 15 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Hey Rana Singh (@ranadeepsingh) 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
## 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
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
🔵 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
## 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
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
## 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
32395b9 to
d68a73a
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
## 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
d68a73a to
9cd4ce1
Compare
There was a problem hiding this comment.
🔵 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
## 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
There was a problem hiding this comment.
🟡 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
276b80e to
2570bc2
Compare
There was a problem hiding this comment.
🟡 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
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
🟡 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
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |


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-lunaby 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, andOpenAIPrompttogpt-6-lunaonly 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, withgpt-6.1-soldocumented 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.
promptCacheKeyand the separate legacypromptCacheRetentioncontrol. Existing request options and ordered breakpoint objects retain mixed TTLs and comparison IDs.cache_write_tokens; Responses also retains thettl_30m_tokens/ttl_12h_tokensbreakdown. Reads and writes stay distinct, and absent counters remain null.logProbsEnabled/topLogProbs; the legacy integerlogProbsAPI remains usable. Responses requests the correspondingincludedata, and raw schemas retain the returned probabilities.serviceTier,safetyIdentifier,metadata, Responsesreasoning/include/truncation, and ChatlogitBias/stopSequences. Chat storage now works through Prompt, including per-row settings and response IDs.temperature/top_pbased 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:
message.output_text.logprobsselector, including deduplication and conflict detection.store=falseis also a no-op; actual storage requests remain unsupported on that route.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.setPromptCacheOptions({"mode": "explicit", "ttl": "30m"})prompt_cache_optionsobjectsetPromptCacheOptionsCol("options")prompt_cache_options; replaces the scalar bindingprompt_cache_breakpoint={"mode": "explicit"}input[].content[].prompt_cache_breakpointobjectmessages[].content[].prompt_cache_breakpointobjectsetReasoningEffort("low")reasoning.effortreasoning_effortsetVerbosity("low")text.verbosityverbositysetMaxCompletionTokens(n)max_output_tokensmax_completion_tokensExample: explicit caching on a stable prefix
Using
rows,endpointandkeyfrom the complete runnable example below: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 typetext, top-levelreasoning_effortandverbosity; 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:
OpenAIPromptforwards 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 useOpenAIResponses/OpenAIChatCompletionwith 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
Pipeline.fitneither freeze global settings nor materialize global credentials on the original stage for later persistence.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.
30m/12hOpenAIPromptgpt-6-lunaRemaining qualification gaps: the tested Azure endpoint rejects
prompt_cache_options.prewarmwith HTTP 400, both natively and through SynapseML, includingprewarm=false. The existing Foundry Llama deployment completes inference but reports no cache counters, so its caching is unverified, not passed. Low-levelOpenAIResponsessave/load hits the Java-UDF deserialization guard even without cache options; the unsafe override was not enabled. The successful persistence case above is specificallyOpenAIPrompt, not every transformer.12hacceptance 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
b51b396704or 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:
b51b396704makes 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:
2570bc2749incorporates master6c2699defc. 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.Review and CI status
Current-revision Azure CI succeeded for merge
abd8fdc0d29bb92fa704ae0537fd2479b9b5ad08, with verified parents target6c2699defcand headb51b396704, 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.ipynbandHyperOpt.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 runcomment queued a PR-triggered run, not a manual build. Its merge commit5b78eb57c8b90a52ebd18dd2ac7dee7207c8ed31has targetd3f3af6bd3e4b7d191f51c9eb29f9aeffe788193and previous PR head73f9c93e54b20ddb05f68cd6d09a949de28ec244as 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:
276b80e92bcontains the request, schema, accounting, prewarm and inference-control fixes summarized above. The preceding documentation amendment selectedgpt-6-luna/gpt-6.1-sol; embedding configuration and archived docs remain unchanged. Earlier CI on73f9c93e54remains 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
prompt_cache_breakpointinside actual input content—not merely an options column.OpenAIPromptexample.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_URLto your Azure OpenAI v1 URL ending in/openai/v1/,OPENAI_API_KEYto your key, andOPENAI_DEPLOYMENTto your chosen deployment. No deployment is created or changed.Shared input and options
OpenAI Python SDK
SynapseML
Mapping and behavior
prompt_cache_optionssetPromptCacheOptions(dict)orsetPromptCacheOptionsCol(column)inputOpenAIResponses.setMessagesCol(column)input[].content[].prompt_cache_breakpointinput_text,input_image, orinput_filecontentmessages[].content[].prompt_cache_breakpointtype="text"response.usage.input_tokens_details.cached_tokensresponse.usage.prompt_tokens_details.cached_tokensOpenAIPromptnormalized usage columnusage.input_token_details["cached_tokens"]for either API; this is a map, unlike the raw response structsAn 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
modeandttl. 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
instructionscannot hold a breakpoint, which is why the example uses developer-message content. OrdinaryOpenAIPrompttemplates 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
30mand 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 a30m-only rule.prompt_cache_options.ttlis not translated into the olderprompt_cache_retentionpolicy. Raw and normalized usage now exposecached_tokensandcache_write_tokensseparately. Responses additionally preserves the write breakdown incache_write_tokens_details.ttl_30m_tokensandcache_write_tokens_details.ttl_12h_tokens; these dotted names are the keys in Prompt's normalized input-details map. Missing counters remain null.