apache / apache/maka

Custom OpenAI Responses relay does not append /v1 when fetching models

Open
#3,320 6 comments 0 reactions 1 assignee Claimed by @Xinbeok View on GitHub
bug
Dominant language
TypeScript
Stars
5.4k
Forks
502
Avg merge
1d 2h
Merged PRs (30d)
715

Description

## English

### What happened

When a custom OpenAI Responses-compatible relay is configured with a root URL such as:

```text
http://relay.example:3000
```

the connection test succeeds, but updating the model catalog fails.

Maka requests:

```text
GET /models
```

However, the relay provides the OpenAI-compatible model list at:

```text
GET /v1/models
```

Cherry Studio works with the same configuration because it automatically appends `/v1` when the base URL does not contain an API version. OpenAI's standard endpoints are also versioned:

```text
GET /v1/models
POST /v1/responses
```

### Expected behavior

We should clarify whether the configured URL is a host root or a complete API base URL, and use the same URL normalization rule for model discovery and Responses requests.

### Environment

- Maka: 0.1.11
- Surface: Desktop
- OS: Windows

---

## 中文

### 问题描述

配置自定义 OpenAI Responses 兼容中转站时,如果服务地址填写为根地址:

```text
http://relay.example:3000
```

连接测试可以成功,但更新模型目录失败。

Maka 当前请求:

```text
GET /models
```

而该中转站的 OpenAI 兼容模型接口为:

```text
GET /v1/models
```

相同配置在 Cherry Studio 中可以使用,因为当地址不包含 API 版本时,它会自动补充 `/v1`。OpenAI 的标准接口也包含版本前缀:

```text
GET /v1/models
POST /v1/responses
```

### 期望行为

需要明确配置地址表示主机根地址还是完整 API Base URL,并让模型发现和 Responses 请求使用一致的 URL 处理规则。

### 环境

- Maka:0.1.11
- 使用端:Desktop
- 系统:Windows

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.