feat(streaming): add StreamTokenResponse type and getRecipeStreamToken API

This commit is contained in:
pyr0ball 2026-04-24 10:23:09 -07:00
parent 63517d135b
commit 7292c5e7fc

View file

@ -525,6 +525,12 @@ export interface RecipeResult {
rate_limit_count: number rate_limit_count: number
} }
export interface StreamTokenResponse {
stream_url: string
token: string
expires_in_s: number
}
export type RecipeJobStatusValue = 'queued' | 'running' | 'done' | 'failed' export type RecipeJobStatusValue = 'queued' | 'running' | 'done' | 'failed'
export interface RecipeJobStatus { export interface RecipeJobStatus {
@ -647,6 +653,18 @@ export const recipesAPI = {
const response = await api.post('/recipes/build', req) const response = await api.post('/recipes/build', req)
return response.data return response.data
}, },
/** Issue a one-time stream token for LLM recipe generation (Paid tier / BYOK only). */
async getRecipeStreamToken(params: {
level: 3 | 4
wildcard_confirmed?: boolean
}): Promise<StreamTokenResponse> {
const response = await api.post('/recipes/stream-token', {
level: params.level,
wildcard_confirmed: params.wildcard_confirmed ?? false,
})
return response.data
},
} }
// ========== Settings API ========== // ========== Settings API ==========