Skip to content

Commit 20c352d

Browse files
fix(api): narrow types
1 parent 1e92341 commit 20c352d

File tree

15 files changed

+1263
-387
lines changed

15 files changed

+1263
-387
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 11
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs%2Fdedalus-sdk-2158e2dd12dc5bc533e872e1fa4a9bd1627c2f15b0e417aa4645554e045d7054.yml
3-
openapi_spec_hash: 30d4d077bf498b7634b3e14deb9d0a1d
4-
config_hash: c520c6ec7d9767224157d03e00c54985
1+
configured_endpoints: 12
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs%2Fdedalus-sdk-3330faa66a188880e45bcc35fa1b899365424c079dfd79b45c4da710eeccab10.yml
3+
openapi_spec_hash: 542937ce78a5c4ee4dbe54ab837151d2
4+
config_hash: 2b25f3d3742dd0d7790fd4339f500a29

api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Types:
1818
- <code><a href="./src/resources/shared.ts">ResponseFormatJSONSchema</a></code>
1919
- <code><a href="./src/resources/shared.ts">ResponseFormatText</a></code>
2020
- <code><a href="./src/resources/shared.ts">ToolChoice</a></code>
21+
- <code><a href="./src/resources/shared.ts">VoiceIDsOrCustomVoice</a></code>
2122

2223
# Models
2324

@@ -97,6 +98,17 @@ Methods:
9798

9899
- <code title="post /v1/ocr">client.ocr.<a href="./src/resources/ocr.ts">process</a>({ ...params }) -> OCRResponse</code>
99100

101+
# Responses
102+
103+
Types:
104+
105+
- <code><a href="./src/resources/responses.ts">Response</a></code>
106+
- <code><a href="./src/resources/responses.ts">ResponseCreateParams</a></code>
107+
108+
Methods:
109+
110+
- <code title="post /v1/responses">client.responses.<a href="./src/resources/responses.ts">create</a>({ ...params }) -> Response</code>
111+
100112
# Chat
101113

102114
## Completions

packages/mcp-server/src/methods.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ export const sdkMethods: SdkMethod[] = [
6868
httpMethod: 'post',
6969
httpPath: '/v1/ocr',
7070
},
71+
{
72+
clientCallName: 'client.responses.create',
73+
fullyQualifiedName: 'responses.create',
74+
httpMethod: 'post',
75+
httpPath: '/v1/responses',
76+
},
7177
{
7278
clientCallName: 'client.chat.completions.create',
7379
fullyQualifiedName: 'chat.completions.create',

src/client.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
} from './resources/images';
3434
import { ListModelsResponse, Model, Models } from './resources/models';
3535
import { OCR, OCRDocument, OCRPage, OCRProcessParams, OCRRequest, OCRResponse } from './resources/ocr';
36+
import { Response, ResponseCreateParams, Responses } from './resources/responses';
3637
import { Audio } from './resources/audio/audio';
3738
import { Chat } from './resources/chat/chat';
3839
import { type Fetch } from './internal/builtin-types';
@@ -873,6 +874,7 @@ export class Dedalus {
873874
audio: API.Audio = new API.Audio(this);
874875
images: API.Images = new API.Images(this);
875876
ocr: API.OCR = new API.OCR(this);
877+
responses: API.Responses = new API.Responses(this);
876878
chat: API.Chat = new API.Chat(this);
877879
}
878880

@@ -881,6 +883,7 @@ Dedalus.Embeddings = Embeddings;
881883
Dedalus.Audio = Audio;
882884
Dedalus.Images = Images;
883885
Dedalus.OCR = OCR;
886+
Dedalus.Responses = Responses;
884887
Dedalus.Chat = Chat;
885888

886889
export declare namespace Dedalus {
@@ -916,6 +919,12 @@ export declare namespace Dedalus {
916919
type OCRProcessParams as OCRProcessParams,
917920
};
918921

922+
export {
923+
Responses as Responses,
924+
type Response as Response,
925+
type ResponseCreateParams as ResponseCreateParams,
926+
};
927+
919928
export { Chat as Chat };
920929

921930
export type Credential = API.Credential;
@@ -934,4 +943,5 @@ export declare namespace Dedalus {
934943
export type ResponseFormatJSONSchema = API.ResponseFormatJSONSchema;
935944
export type ResponseFormatText = API.ResponseFormatText;
936945
export type ToolChoice = API.ToolChoice;
946+
export type VoiceIDsOrCustomVoice = API.VoiceIDsOrCustomVoice;
937947
}

src/resources/audio/speech.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../core/resource';
4+
import * as Shared from '../shared';
45
import { APIPromise } from '../../core/api-promise';
56
import { buildHeaders } from '../../internal/headers';
67
import { RequestOptions } from '../../internal/request-options';
@@ -32,19 +33,21 @@ export interface SpeechCreateParams {
3233
input: string;
3334

3435
/**
35-
* One of the available [TTS models](https://platform.openai.com/docs/models#tts):
36-
* `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
36+
* One of the available [TTS models](/docs/models#tts): `tts-1`, `tts-1-hd`,
37+
* `gpt-4o-mini-tts`, or `gpt-4o-mini-tts-2025-12-15`.
3738
*/
38-
model: (string & {}) | 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts';
39+
model: (string & {}) | 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | 'gpt-4o-mini-tts-2025-12-15';
3940

4041
/**
41-
* The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
42-
* `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and
43-
* `verse`. Previews of the voices are available in the
44-
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
42+
* The voice to use when generating the audio. Supported built-in voices are
43+
* `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
44+
* `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice
45+
* object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
46+
* voices are available in the
47+
* [Text to speech guide](/docs/guides/text-to-speech#voice-options).
4548
*/
4649
voice:
47-
| (string & {})
50+
| string
4851
| 'alloy'
4952
| 'ash'
5053
| 'ballad'
@@ -54,7 +57,8 @@ export interface SpeechCreateParams {
5457
| 'shimmer'
5558
| 'verse'
5659
| 'marin'
57-
| 'cedar';
60+
| 'cedar'
61+
| Shared.VoiceIDsOrCustomVoice;
5862

5963
/**
6064
* Control the voice of your generated audio with additional instructions. Does not

src/resources/audio/transcriptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export namespace TranscriptionCreateResponse {
9696

9797
export namespace CreateTranscriptionResponseVerboseJSON {
9898
/**
99-
* Fields:
99+
* Fields: # noqa: D415.
100100
*
101101
* - id (required): int
102102
* - seek (required): int
@@ -180,7 +180,7 @@ export namespace TranscriptionCreateResponse {
180180
}
181181

182182
/**
183-
* Fields:
183+
* Fields: # noqa: D415.
184184
*
185185
* - word (required): str
186186
* - start (required): float
@@ -237,7 +237,7 @@ export namespace TranscriptionCreateResponse {
237237

238238
export namespace CreateTranscriptionResponseJSON {
239239
/**
240-
* Fields:
240+
* Fields: # noqa: D415.
241241
*
242242
* - token (optional): str
243243
* - logprob (optional): float

src/resources/audio/translations.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class Translations extends APIResource {
3030
}
3131

3232
/**
33-
* Fields:
33+
* Fields: # noqa: D415.
3434
*
3535
* - language (required): str
3636
* - duration (required): float
@@ -43,7 +43,7 @@ export type TranslationCreateResponse =
4343

4444
export namespace TranslationCreateResponse {
4545
/**
46-
* Fields:
46+
* Fields: # noqa: D415.
4747
*
4848
* - language (required): str
4949
* - duration (required): float
@@ -74,7 +74,7 @@ export namespace TranslationCreateResponse {
7474

7575
export namespace CreateTranslationResponseVerboseJSON {
7676
/**
77-
* Fields:
77+
* Fields: # noqa: D415.
7878
*
7979
* - id (required): int
8080
* - seek (required): int
@@ -144,7 +144,7 @@ export namespace TranslationCreateResponse {
144144
}
145145

146146
/**
147-
* Fields:
147+
* Fields: # noqa: D415.
148148
*
149149
* - text (required): str
150150
*/

0 commit comments

Comments
 (0)