File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -291,12 +291,6 @@ class AxAIAnthropicImpl
291291 ...configToolsCleaned ,
292292 ] ;
293293
294- // Anthropic Vertex does not support server tools like web_search; filter them out
295- if ( this . isVertex && tools . length > 0 ) {
296- tools = tools . filter (
297- ( t : any ) => ! ( t && typeof t === 'object' && 'type' in t )
298- ) ;
299- }
300294 if ( tools . length === 0 ) {
301295 tools = undefined ;
302296 }
@@ -870,7 +864,8 @@ export class AxAIAnthropic<TModelKey = string> extends AxBaseAI<
870864 apiURL = 'https://api.anthropic.com/v1' ;
871865 headers = async ( ) => ( {
872866 'anthropic-version' : '2023-06-01' ,
873- 'anthropic-beta' : 'structured-outputs-2025-11-13' ,
867+ 'anthropic-beta' :
868+ 'structured-outputs-2025-11-13, web-search-2025-03-05' ,
874869 'x-api-key' : typeof apiKey === 'function' ? await apiKey ( ) : apiKey ,
875870 } ) ;
876871 }
Original file line number Diff line number Diff line change @@ -47,11 +47,6 @@ import {
4747} from './functions.js' ;
4848import { axGlobals } from './globals.js' ;
4949import { toJsonSchema } from './jsonSchema.js' ;
50- import {
51- validateURL ,
52- validateStringConstraints ,
53- validateNumberConstraints ,
54- } from './validators.js' ;
5550import {
5651 type AxGenMetricsInstruments ,
5752 getOrCreateGenMetricsInstruments ,
@@ -90,6 +85,11 @@ import type {
9085 AxSetExamplesOptions ,
9186} from './types.js' ;
9287import { mergeDeltas } from './util.js' ;
88+ import {
89+ validateNumberConstraints ,
90+ validateStringConstraints ,
91+ validateURL ,
92+ } from './validators.js' ;
9393
9494export type AxGenerateResult < OUT > = OUT & {
9595 thought ?: string ;
You can’t perform that action at this time.
0 commit comments