mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-12 14:10:19 +08:00
feat(frontend): 澄清模型映射适用范围
This commit is contained in:
@@ -50,9 +50,11 @@ describe('api format display helpers', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('applies Responses to Search permissions in one direction', () => {
|
||||
it('applies Responses companion permissions in one direction', () => {
|
||||
expect(apiFormatPermissionCovers('OPENAI_RESPONSES', 'openai:search')).toBe(true)
|
||||
expect(apiFormatPermissionCovers('OPENAI_RESPONSES', 'openai:responses:compact')).toBe(true)
|
||||
expect(apiFormatPermissionCovers('openai:search', 'openai:responses')).toBe(false)
|
||||
expect(apiFormatPermissionCovers('openai:responses:compact', 'openai:responses')).toBe(false)
|
||||
})
|
||||
|
||||
it('formats embedding api format ids distinctly from chat formats', () => {
|
||||
|
||||
@@ -235,7 +235,9 @@ export function apiFormatPermissionCovers(
|
||||
return Boolean(allowed)
|
||||
&& Boolean(requested)
|
||||
&& (allowed === requested
|
||||
|| (allowed === API_FORMATS.OPENAI_RESPONSES && requested === API_FORMATS.OPENAI_SEARCH))
|
||||
|| (allowed === API_FORMATS.OPENAI_RESPONSES
|
||||
&& (requested === API_FORMATS.OPENAI_RESPONSES_COMPACT
|
||||
|| requested === API_FORMATS.OPENAI_SEARCH)))
|
||||
}
|
||||
|
||||
// 工具函数:按 family 分组并排序 API 格式数组
|
||||
|
||||
Reference in New Issue
Block a user