Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Description

Migrates Azure.AI.Language.QuestionAnswering.Inference from the legacy AutoRest generator to the new azure-typespec-http-client-csharp generator.

Changes

  • Regenerated SDK code using the new TypeSpec-based generator
  • Updated customization files to use Microsoft.TypeSpec.Generator.Customizations namespace:
    • CodeGenMember and CodeGenType attributes
    • Argument.AssertNotNull instead of Argument.CheckNotNull (same behavior)
    • Pipeline property instead of _pipeline field in client constructors
  • Removed IncludeAutorestDependency from csproj (no longer needed)
  • Added QuestionAnsweringModelFactory wrapper delegating to generated LanguageQuestionAnsweringInferenceModelFactory for backward compatibility

Note

The upstream TypeSpec spec in azure-rest-api-specs has invalid emitter config options (package-dir, package-name) for @azure-typespec/http-client-csharp. Worked around by fixing the downloaded tspconfig.yaml during generation.


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

SDK Generation Guidelines

  • If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
  • The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code.
  • The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • iojs.org
    • Triggering command: /usr/bin/curl curl --fail --compressed -q -L -s REDACTED -o - (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate Azure.AI.Language.QuestionAnswering.Inference to new generator</issue_title>
<issue_description>https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering.Inference

See https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/documentintelligence/Azure.AI.DocumentIntelligence as an example.

</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 5, 2025 03:50
- Updated tsp-location.yaml to use azure-typespec-http-client-csharp emitter
- Regenerated SDK code with the new generator
- Updated customization files to use Microsoft.TypeSpec.Generator.Customizations
- Removed legacy IncludeAutorestDependency from csproj
- Fixed client constructors to use Pipeline property instead of _pipeline field

Co-authored-by: JoshLove-msft <[email protected]>
Copilot AI changed the title [WIP] Migrate Azure.AI.Language.QuestionAnswering.Inference to new generator Migrate Azure.AI.Language.QuestionAnswering.Inference to new generator Dec 5, 2025
Copilot AI requested a review from JoshLove-msft December 5, 2025 04:00
Copilot finished work on behalf of JoshLove-msft December 5, 2025 04:00
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.

Migrate Azure.AI.Language.QuestionAnswering.Inference to new generator

2 participants