Skip to content

Commit 51de2c9

Browse files
committed
update
1 parent d0f5fa9 commit 51de2c9

File tree

6 files changed

+15
-30
lines changed

6 files changed

+15
-30
lines changed

examples/agent-patterns/agents-as-tools.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ const orchestratorAgent = new Agent({
3333
runConfig: {
3434
model: 'gpt-5',
3535
modelSettings: {
36-
providerData: {
37-
reasoning: { effort: 'low' },
38-
text: { verbosity: 'low' },
39-
},
36+
reasoning: { effort: 'low' },
37+
text: { verbosity: 'low' },
4038
},
4139
},
4240
runOptions: {

examples/basic/hello-world-gpt-oss.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ async function main() {
2525
'gpt-oss:20b',
2626
),
2727
instructions: 'You answer questions concisely and to the point.',
28-
modelSettings: {
29-
providerData: { reasoning: { effort: 'low' } },
30-
},
28+
modelSettings: { reasoning: { effort: 'low' } },
3129
});
3230

3331
const question = 'Tell me about recursion in programming.';

examples/basic/reasoning.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,8 @@ async function main() {
99
name: 'Agent',
1010
model: 'gpt-5',
1111
modelSettings: {
12-
providerData: {
13-
reasoning: {
14-
effort: 'high',
15-
summary: 'auto',
16-
},
17-
text: {
18-
verbosity: 'high',
19-
},
20-
},
12+
reasoning: { effort: 'high', summary: 'auto' },
13+
text: { verbosity: 'high' },
2114
},
2215
});
2316

examples/tools/web-search-filters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ async function main() {
2121
}),
2222
],
2323
modelSettings: {
24+
reasoning: { effort: 'low' },
25+
text: { verbosity: 'low' },
2426
providerData: {
25-
reasoning: { effort: 'low' },
26-
text: { verbosity: 'low' },
2727
// https://platform.openai.com/docs/guides/tools-web-search?api-mode=responses#sources
2828
include: ['web_search_call.action.sources'],
2929
},

packages/agents-core/src/defaultModel.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ export function getDefaultModelSettings(model?: string): ModelSettings {
4343
const _model = model ?? getDefaultModel();
4444
if (gpt5ReasoningSettingsRequired(_model)) {
4545
return {
46-
providerData: {
47-
// We chose "low" instead of "minimal" because some of the built-in tools
48-
// (e.g., file search, image generation, etc.) do not support "minimal"
49-
// If you want to use "minimal" reasoning effort, you can pass your own model settings
50-
reasoning: { effort: 'low' },
51-
text: { verbosity: 'low' },
52-
},
46+
// We chose "low" instead of "minimal" because some of the built-in tools
47+
// (e.g., file search, image generation, etc.) do not support "minimal"
48+
// If you want to use "minimal" reasoning effort, you can pass your own model settings
49+
reasoning: { effort: 'low' },
50+
text: { verbosity: 'low' },
5351
};
5452
}
5553
return {};

packages/agents-core/test/agent.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Handoff, handoff } from '../src/handoff';
55
import { z } from 'zod';
66
import { JsonSchemaDefinition, setDefaultModelProvider } from '../src';
77
import { FakeModelProvider } from './stubs';
8-
import { Runner } from '../src/run';
8+
import { Runner, RunConfig } from '../src/run';
99

1010
describe('Agent', () => {
1111
afterEach(() => {
@@ -221,12 +221,10 @@ describe('Agent', () => {
221221
.spyOn(Runner.prototype, 'run')
222222
.mockImplementation(async () => mockResult);
223223

224-
const runConfig = {
224+
const runConfig: Partial<RunConfig> = {
225225
model: 'gpt-5',
226226
modelSettings: {
227-
providerData: {
228-
reasoning: { effort: 'low' },
229-
},
227+
reasoning: { effort: 'low' },
230228
},
231229
};
232230
const runOptions = {

0 commit comments

Comments
 (0)