Skip to content

Special custom endpoint not available #191

@JadynWong

Description

@JadynWong

Confirm this is not an issue with the underlying OpenAI API

  • This is an issue with the Python library

Confirm this is not an issue with Azure OpenAI

  • This is not an issue with Azure OpenAI

Describe the bug

After the #186 merged (2.0.0-beta.10), special custom endpoints are no longer available. All clients have a '/v1' path prefix. This is different from the behavior of the Python version.

Such as https://open.bigmodel.cn/api/paas/v4 and other special custom endpoints.

To Reproduce

  1. Execute chat completions by a special endpoint.
var client = new OpenAIClient("api-key", new()
        {
            Endpoint = new Uri("https://open.bigmodel.cn/api/paas/v4")
        });
var chatClient = client.GetChatClient("glm-4");
ChatCompletion completion = client.CompleteChat("Say 'this is a test.'");

Got 404 exception. The chat completions link is build as "https://open.bigmodel.cn/api/paas/v4/v1/chat/completions". It should be "https://open.bigmodel.cn/api/paas/v4/chat/completions".

Code snippets

No response

OS

windows

.NET version

8.0

Library version

2.0.0-beta.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategory: Something isn't working and appears to be a defect in the client library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions