mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 01:47:47 +08:00
fix(usage): unify OpenAI Live and WebSocket records
This commit is contained in:
@@ -257,6 +257,8 @@ export interface RequestDetail {
|
||||
usage_pricing_available?: boolean
|
||||
input_audio_tokens?: number | null
|
||||
output_audio_tokens?: number | null
|
||||
live_session?: Record<string, unknown> | null
|
||||
realtime_session?: Record<string, unknown> | null
|
||||
upstream_is_stream?: boolean
|
||||
client_requested_stream?: boolean
|
||||
client_is_stream?: boolean
|
||||
|
||||
@@ -61,11 +61,11 @@ describe('api format display helpers', () => {
|
||||
expect(apiFormatPermissionCovers('openai:responses:compact', 'openai:responses')).toBe(false)
|
||||
})
|
||||
|
||||
it('keeps public Realtime and private Codex Live formats distinct', () => {
|
||||
it('presents the private Codex Live protocol as OpenAI Live while keeping formats distinct', () => {
|
||||
expect(formatApiFormat(API_FORMATS.OPENAI_REALTIME)).toBe('OpenAI Realtime')
|
||||
expect(formatApiFormatShort(API_FORMATS.OPENAI_REALTIME)).toBe('ORT')
|
||||
expect(formatApiFormat(API_FORMATS.CODEX_LIVE)).toBe('Codex Live')
|
||||
expect(formatApiFormatShort(API_FORMATS.CODEX_LIVE)).toBe('CL')
|
||||
expect(formatApiFormat(API_FORMATS.CODEX_LIVE)).toBe('OpenAI Live')
|
||||
expect(formatApiFormatShort(API_FORMATS.CODEX_LIVE)).toBe('OL')
|
||||
expect(apiFormatPermissionCovers('openai:realtime', 'openai:realtime')).toBe(true)
|
||||
expect(apiFormatPermissionCovers('codex:live', 'codex:live')).toBe(true)
|
||||
expect(apiFormatPermissionCovers('openai:responses', 'openai:realtime')).toBe(false)
|
||||
|
||||
@@ -39,7 +39,7 @@ export const API_FORMAT_LABELS: Record<string, string> = {
|
||||
[API_FORMATS.OPENAI_VIDEO]: 'OpenAI Video',
|
||||
[API_FORMATS.OPENAI_EMBEDDING]: 'OpenAI Embedding',
|
||||
[API_FORMATS.OPENAI_RERANK]: 'OpenAI Rerank',
|
||||
[API_FORMATS.CODEX_LIVE]: 'Codex Live',
|
||||
[API_FORMATS.CODEX_LIVE]: 'OpenAI Live',
|
||||
[API_FORMATS.GEMINI_GENERATE_CONTENT]: 'Gemini Generate Content',
|
||||
[API_FORMATS.GEMINI_INTERACTIONS]: 'Gemini Interactions',
|
||||
[API_FORMATS.GEMINI_VIDEO]: 'Gemini Video',
|
||||
@@ -61,8 +61,8 @@ export const API_FORMAT_LABELS: Record<string, string> = {
|
||||
OPENAI_VIDEO: 'OpenAI Video',
|
||||
OPENAI_EMBEDDING: 'OpenAI Embedding',
|
||||
OPENAI_RERANK: 'OpenAI Rerank',
|
||||
CODEX_LIVE: 'Codex Live',
|
||||
LIVE: 'Codex Live',
|
||||
CODEX_LIVE: 'OpenAI Live',
|
||||
LIVE: 'OpenAI Live',
|
||||
GEMINI: 'Gemini Generate Content',
|
||||
GEMINI_GENERATE_CONTENT: 'Gemini Generate Content',
|
||||
GEMINI_INTERACTIONS: 'Gemini Interactions',
|
||||
@@ -86,7 +86,7 @@ export const API_FORMAT_SHORT: Record<string, string> = {
|
||||
[API_FORMATS.OPENAI_VIDEO]: 'OV',
|
||||
[API_FORMATS.OPENAI_EMBEDDING]: 'OE',
|
||||
[API_FORMATS.OPENAI_RERANK]: 'ORR',
|
||||
[API_FORMATS.CODEX_LIVE]: 'CL',
|
||||
[API_FORMATS.CODEX_LIVE]: 'OL',
|
||||
[API_FORMATS.CLAUDE_MESSAGES]: 'CM',
|
||||
[API_FORMATS.GEMINI_GENERATE_CONTENT]: 'G',
|
||||
[API_FORMATS.GEMINI_INTERACTIONS]: 'GI',
|
||||
@@ -107,8 +107,8 @@ export const API_FORMAT_SHORT: Record<string, string> = {
|
||||
OPENAI_VIDEO: 'OV',
|
||||
OPENAI_EMBEDDING: 'OE',
|
||||
OPENAI_RERANK: 'ORR',
|
||||
CODEX_LIVE: 'CL',
|
||||
LIVE: 'CL',
|
||||
CODEX_LIVE: 'OL',
|
||||
LIVE: 'OL',
|
||||
CLAUDE: 'CM',
|
||||
CLAUDE_MESSAGES: 'CM',
|
||||
GEMINI: 'G',
|
||||
|
||||
@@ -343,6 +343,7 @@ export const meApi = {
|
||||
timezone?: string
|
||||
tz_offset_minutes?: number
|
||||
search?: string // 通用搜索:密钥名、模型名
|
||||
api_format?: string
|
||||
status?: string
|
||||
limit?: number
|
||||
offset?: number
|
||||
|
||||
Reference in New Issue
Block a user