Skip to content

[azure-ai-projects] Regenerate from TypeSpec for rubric scoring - #49932

Draft
Sydney Lister (slister1001) wants to merge 3 commits into
feature/azure-ai-projects/vnextfrom
sydneylister/rubric-scoring-emit
Draft

Sydney Lister (slister1001) wants to merge 3 commits into
feature/azure-ai-projects/vnextfrom
sydneylister/rubric-scoring-emit

Conversation

@slister1001

Copy link
Copy Markdown
Member

Summary

Regenerates azure-ai-projects from the latest Foundry TypeSpec (feature/foundry-release, spec commit 96acdcd) to pick up the rubric evaluator contract changes. This PR contains only the emitted code, the patch fixes needed for it, and the CHANGELOG feature entries. The sample updates are split into a stacked PR so they can be reviewed on their own: #49931.

Rubric changes picked up

  • RubricScoring and RubricScoringMode (LIKERT, BOOLEAN), plus RubricBasedEvaluatorDefinition.scoring and pass_threshold.
  • Dimension.allowed (safety) and read-only Dimension.generated_weight. Dimension.weight is now optional.
  • EvaluatorGenerationInputs.category, scoring, pass_threshold, and dimensions. model is now optional (required for quality, ignored for safety).

Commits

  1. Part 1: Emit SDK from TypeSpec. Generated code only (tsp-client update).
  2. Part 2: Update patches, docs, and tests. Handwritten _patch fixes for the regenerated agent insights operations, docs/public-methods.md, and a test helper update.
  3. Part 3: Update changelog.

Overlap

The regen also pulls in non-rubric TypeSpec changes that overlap with #49876 (Howie Leung (@howieleung)) and #49905, #49916, #49918, #49924 (aprilk-ms). Whichever merges second will need a trivial rebase of generated files.

Validation

  • Unit and playback tests pass for the package.
  • black applied to edited files only.

Howie Leung (@howieleung) could you review and sign off by 9am PT 11/11? This is needed for the Ignite docs deadline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a45052f-957c-4296-b540-6c8f5cbddbc3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a45052f-957c-4296-b540-6c8f5cbddbc3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4a45052f-957c-4296-b540-6c8f5cbddbc3
@azure-sdk-automation

Copy link
Copy Markdown
Contributor

Add sdk-api-review-ready when this working PR is ready for API review of azure-ai-projects. The review will compare target version 2.11.0 from this working PR against baseline version 2.10.0 (tag azure-ai-projects_2.10.0). If you need a different comparison, use the Azure SDK CLI (azsdk apireview create).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@slister1001

Copy link
Copy Markdown
Member Author

Companion .NET PRs: Azure/azure-sdk-for-net#64776 (regen) and Azure/azure-sdk-for-net#64775 (samples).

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor
[Pilot] PR Pipeline Failure Analysis

What failed

All failures on PR #49932 build 7060574 trace to one root cause: the regenerated azure-ai-projects operations surface does not match the names used by the handwritten patch/tests/samples that were updated in commit 2 ("Update patches, docs, and tests").

Test collection failures (all 6 platforms × sdist/whl = 12 failed test-file collections, 2 distinct tests each):

  • sdk.ai.azure-ai-projects.tests.agent_insights.test_agent_insight_pollers
  • sdk.ai.azure-ai-projects.tests.agent_insights.test_agent_insights_samples

Both fail identically on macos311, ubuntu2404_311, ubuntu2404_311_coverage, Ubuntu2404_313, Ubuntu2404_314, and windows2022_312:

ImportError: cannot import name 'BetaAgentInsightMonitorsOperations' from 'azure.ai.projects.operations'
ImportError: cannot import name 'BetaAgentInsightMonitorsOperations' from 'azure.ai.projects.aio.operations._patch_agent_insights_async'

BetaAgentInsightMonitorsOperations is referenced by the test modules but is not exported (or no longer named that) in the regenerated/patched operations modules — a single naming-drift bug causing the same two test files to fail collection everywhere, not 12 separate issues.

Static type-check failures (pyright + mypy, same build, azure-ai-projects package, 59 pyright errors / multiple mypy errors):

  • azure/ai/projects/_unions.py:26 — "_unions" is not defined (reportUndefinedVariable) / mypy name-defined
  • samples/agent_insights/*.py — AgentInsightMonitorCreate, AgentInsightMonitorUpdate, AgentInsightRunCreate, BetaAgentInsightMonitorsOperations are unknown import symbols; BetaOperations has no attribute agent_insight_monitors
  • samples/skills/*.py, samples/agents/tools/*.py — BetaOperations has no attribute skills
  • samples/evaluations/sample_rubric_evaluator_generation_iterate.py:126-127 — max()/min() called with a key returning int | None, which mypy/pyright reject because None isn't SupportsRichComparison
Relevant pipeline output
tests/agent_insights/test_agent_insight_pollers.py:23: in <module>
    from azure.ai.projects.aio.operations._patch_agent_insights_async import (
E   ImportError: cannot import name 'BetaAgentInsightMonitorsOperations' from 'azure.ai.projects.aio.operations._patch_agent_insights_async'

tests/agent_insights/test_agent_insights_samples.py:22: in <module>
    from azure.ai.projects.operations import BetaAgentInsightMonitorsOperations
E   ImportError: cannot import name 'BetaAgentInsightMonitorsOperations' from 'azure.ai.projects.operations'

[pyright] azure/ai/projects/_unions.py:26:37 - error: "_unions" is not defined (reportUndefinedVariable)
[pyright] samples/agent_insights/agent_insights_util.py:26:5 - error: "AgentInsightMonitorUpdate" is unknown import symbol (reportAttributeAccessIssue)
[pyright] samples/skills/sample_skills_crud.py:59:29 - error: Cannot access attribute "skills" for class "BetaOperations"
[mypy] samples/evaluations/sample_rubric_evaluator_generation_iterate.py:126: error: Argument "key" to "max" has incompatible type "Callable[[Dimension], int | None]"; expected "Callable[[Dimension], SupportsDunderLT[Any] | SupportsDunderGT[Any]]"  [arg-type]

Recommended next steps

Automated fix: Fix found, view and apply fix

Generated by Pipeline Analysis Next Steps · copilot · sonnet50 · 82.2 AIC · ⌖ 0.589 AIC · ⊞ 9.1K · ◷

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant