Skip to content

Add polyglot exports for Aspire.Hosting.OpenAI#14908

Merged
sebastienros merged 3 commits intorelease/13.2from
sebros/polyglot-openai
Mar 4, 2026
Merged

Add polyglot exports for Aspire.Hosting.OpenAI#14908
sebastienros merged 3 commits intorelease/13.2from
sebros/polyglot-openai

Conversation

@sebastienros
Copy link
Contributor

Related to #14069

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 3, 2026 19:05
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14908

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14908"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds polyglot (capability) exports for Aspire.Hosting.OpenAI and introduces a TypeScript validation AppHost to exercise the generated bindings.

Changes:

  • Annotates OpenAI hosting extension methods with AspireExport for polyglot hosts.
  • Adds a TypeScript ValidationAppHost scaffold (tsconfig/package/apphost/run config).
  • Adds generated TypeScript SDK/modules used by the validation host.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Aspire.Hosting.OpenAI/OpenAIExtensions.cs Adds AspireExport attributes to expose OpenAI capabilities to polyglot hosts.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/tsconfig.json TypeScript compiler configuration for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/package.json Node/TS project manifest for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/apphost.ts Minimal TypeScript AppHost entrypoint using the generated SDK.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/apphost.run.json Local run profile/environment settings for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/transport.ts JSON-RPC transport layer and handle/callback/cancellation plumbing for the TS SDK.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/base.ts Core TS SDK base types (ResourceBuilderBase, ReferenceExpression, collection wrappers).
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/aspire.ts Generated capability-based Aspire TypeScript SDK including OpenAI surface area.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.modules/.codegen-hash Records the codegen hash for the generated TS modules.
playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/.aspire/settings.json Declares this playground host as a TypeScript/nodejs Aspire app host and lists packages.
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.OpenAI/ValidationAppHost/package-lock.json: Language not supported

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 6da1ef3:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22646728369

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sebastienros sebastienros enabled auto-merge (squash) March 4, 2026 00:25
@sebastienros sebastienros merged commit ff4a7c3 into release/13.2 Mar 4, 2026
757 of 761 checks passed
@sebastienros sebastienros deleted the sebros/polyglot-openai branch March 4, 2026 00:29
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 4, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Add polyglot exports for Aspire.Hosting.OpenAI

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refine AspireExport descriptions for polyglot-openai

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use generated methods in openai apphost

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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