Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
50dff6a2
authored
Feb 11, 2026
by
Calcium-Ion
Committed by
GitHub
Feb 11, 2026
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2909 from seefs001/fix/stream-supported-channel
parents
c86cd86c
7b1e40ed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
15 deletions
+36
-15
.cursor/rules/project.mdc
+6
-0
AGENTS.md
+6
-0
CLAUDE.md
+6
-0
relay/common/relay_info.go
+18
-15
No files found.
.cursor/rules/project.mdc
View file @
50dff6a2
...
...
@@ -103,3 +103,9 @@ Use `bun` as the preferred package manager and script runner for the frontend (`
- `bun run dev` for development server
- `bun run build` for production build
- `bun run i18n:*` for i18n tooling
### Rule 4: New Channel StreamOptions Support
When implementing a new channel:
- Confirm whether the provider supports `StreamOptions`.
- If supported, add the channel to `streamSupportedChannels`.
AGENTS.md
View file @
50dff6a2
...
...
@@ -98,3 +98,9 @@ Use `bun` as the preferred package manager and script runner for the frontend (`
-
`bun run dev`
for development server
-
`bun run build`
for production build
-
`bun run i18n:*`
for i18n tooling
### Rule 4: New Channel StreamOptions Support
When implementing a new channel:
-
Confirm whether the provider supports
`StreamOptions`
.
-
If supported, add the channel to
`streamSupportedChannels`
.
CLAUDE.md
View file @
50dff6a2
...
...
@@ -98,3 +98,9 @@ Use `bun` as the preferred package manager and script runner for the frontend (`
-
`bun run dev`
for development server
-
`bun run build`
for production build
-
`bun run i18n:*`
for i18n tooling
### Rule 4: New Channel StreamOptions Support
When implementing a new channel:
-
Confirm whether the provider supports
`StreamOptions`
.
-
If supported, add the channel to
`streamSupportedChannels`
.
relay/common/relay_info.go
View file @
50dff6a2
...
...
@@ -290,21 +290,24 @@ func (info *RelayInfo) ToString() string {
// 定义支持流式选项的通道类型
var
streamSupportedChannels
=
map
[
int
]
bool
{
constant
.
ChannelTypeOpenAI
:
true
,
constant
.
ChannelTypeAnthropic
:
true
,
constant
.
ChannelTypeAws
:
true
,
constant
.
ChannelTypeGemini
:
true
,
constant
.
ChannelCloudflare
:
true
,
constant
.
ChannelTypeAzure
:
true
,
constant
.
ChannelTypeVolcEngine
:
true
,
constant
.
ChannelTypeOllama
:
true
,
constant
.
ChannelTypeXai
:
true
,
constant
.
ChannelTypeDeepSeek
:
true
,
constant
.
ChannelTypeBaiduV2
:
true
,
constant
.
ChannelTypeZhipu_v4
:
true
,
constant
.
ChannelTypeAli
:
true
,
constant
.
ChannelTypeSubmodel
:
true
,
constant
.
ChannelTypeCodex
:
true
,
constant
.
ChannelTypeOpenAI
:
true
,
constant
.
ChannelTypeAnthropic
:
true
,
constant
.
ChannelTypeAws
:
true
,
constant
.
ChannelTypeGemini
:
true
,
constant
.
ChannelCloudflare
:
true
,
constant
.
ChannelTypeAzure
:
true
,
constant
.
ChannelTypeVolcEngine
:
true
,
constant
.
ChannelTypeOllama
:
true
,
constant
.
ChannelTypeXai
:
true
,
constant
.
ChannelTypeDeepSeek
:
true
,
constant
.
ChannelTypeBaiduV2
:
true
,
constant
.
ChannelTypeZhipu_v4
:
true
,
constant
.
ChannelTypeAli
:
true
,
constant
.
ChannelTypeSubmodel
:
true
,
constant
.
ChannelTypeCodex
:
true
,
constant
.
ChannelTypeMoonshot
:
true
,
constant
.
ChannelTypeMiniMax
:
true
,
constant
.
ChannelTypeSiliconFlow
:
true
,
}
func
GenRelayInfoWs
(
c
*
gin
.
Context
,
ws
*
websocket
.
Conn
)
*
RelayInfo
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment