Skip to content

OpenAIHealthCheck does not use custom endpoint #11762

@dmi-harlow

Description

@dmi-harlow

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When using a custom OpenAI endpoint, .WithHealthCheck() checks https://status.openai.com/api/v2/status.json instead of checking the custom endpoint.

Expected Behavior

WithHealthCheck should use the custom endpoint.

Steps To Reproduce

Use the sample project at https://github.com/dotnet/aspire/tree/main/playground/OpenAIEndToEnd and replace:

var chat = builder.AddOpenAI("openai").AddModel("chat", "gpt-4o-mini").WithHealthCheck();

with:

var chat = builder.AddOpenAI("openai").WithEndpoint("http://localhost:12434/engines/v1").AddModel("chat", "ai/smollm2:135M-Q2_K").WithHealthCheck();

This assumes you have Docker Model Runner configured with the default endpoint and pulled model "ai/smollm2:135M-Q2_K" (I chose this model because it is only an 80MB download, but which model you use is not relevant to this bug).

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-integrationsIssues pertaining to Aspire Integrations packages

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions