@@ -13,6 +13,18 @@ const hotFixAntShipNoEmptyTextBlocks = true; // Replace empty text blocks with a
1313 *
1414 * ## Updates
1515 *
16+ * ### 2026-06-30 - API Sync: new tool versions, refusal categories, Sonnet 5 verified
17+ * - Tools: Added web_search_20260318 / web_fetch_20260318 (GA, 2026-06-11) - adds `response_inclusion` ('full'|'excluded')
18+ * to drop the nested search/fetch call+result pair from the response once consumed by a completed code-execution call
19+ * (dynamic filtering). Wired as the new default for the dynamic-filtering path (replacing _20260209); `response_inclusion`
20+ * left unset (defaults to 'full') - this is purely the version bump, no behavior change.
21+ * - StopDetails.category: added 'frontier_llm', 'military_weapons' (current docs list these alongside 'cyber'/'bio'/'reasoning_extraction')
22+ * - Verified empirically against the live API: Claude Sonnet 5 (launched 2026-06-29) breaking changes (temperature/top_p/top_k
23+ * rejected, manual thinking budget rejected, but thinking.disabled and forced tool_choice both OK unlike Fable/Mythos 5) -
24+ * existing adapter logic already handles all of these correctly via LLM_IF_HOTFIX_NoTemperature + per-model thinking-budget plumbing.
25+ * - NOT adopted (tracked in anthropic.parser.ts top comment): mid-conversation system messages (role: 'system', Opus 4.8
26+ * only, GA 2026-05-28) - appends operator-priority instructions mid-`messages` without invalidating the cached prefix.
27+ *
1628 * ### 2026-06-09 - API Sync: Claude Fable 5 / Mythos 5, forward-compatible parsing
1729 * - StopDetails.category: added 'reasoning_extraction' (Fable 5 ToS classifier for reverse engineering / output duplication)
1830 * - StopDetails: added `recommended_model` (suggested retry model when a server-side fallback could not run)
@@ -802,6 +814,18 @@ export namespace AnthropicWire_Tools {
802814 use_cache : z . boolean ( ) . optional ( ) , // default true; set false to bypass cache and fetch fresh content
803815 } ) ;
804816
817+ /**
818+ * [Anthropic, 2026-06-11 GA] Latest - adds `response_inclusion`.
819+ * When the fetch was called programmatically from a completed code-execution call (dynamic filtering), 'excluded'
820+ * drops the nested server_tool_use(web_fetch) + web_fetch_tool_result pair from the response entirely (verified
821+ * empirically: ~98% response size reduction on a full page fetch). Default 'full' (unchanged from prior versions).
822+ * Direct calls, or code-execution calls that paused before completing, are always returned in full regardless.
823+ */
824+ const _WebFetchTool_20260318_schema = _WebFetchTool_20260309_schema . extend ( {
825+ type : z . literal ( 'web_fetch_20260318' ) ,
826+ response_inclusion : z . enum ( [ 'full' , 'excluded' ] ) . optional ( ) , // default: 'full'
827+ } ) ;
828+
805829 // -- Web Search Tools --
806830
807831 const _WebSearchTool_20250305_schema = _ToolDefinitionBase_schema . extend ( {
@@ -813,11 +837,17 @@ export namespace AnthropicWire_Tools {
813837 user_location : z . any ( ) . nullish ( ) , // UserLocation schema
814838 } ) ;
815839
816- /** [Anthropic, Feb 2026 GA] Web search v2 - latest . */
840+ /** [Anthropic, Feb 2026 GA] Web search v2. */
817841 const _WebSearchTool_20260209_schema = _WebSearchTool_20250305_schema . extend ( {
818842 type : z . literal ( 'web_search_20260209' ) ,
819843 } ) ;
820844
845+ /** [Anthropic, 2026-06-11 GA] Latest - adds `response_inclusion`, see _WebFetchTool_20260318_schema for semantics. */
846+ const _WebSearchTool_20260318_schema = _WebSearchTool_20260209_schema . extend ( {
847+ type : z . literal ( 'web_search_20260318' ) ,
848+ response_inclusion : z . enum ( [ 'full' , 'excluded' ] ) . optional ( ) , // default: 'full'
849+ } ) ;
850+
821851
822852 export const ToolDefinition_schema = z . discriminatedUnion ( 'type' , [
823853 // Client-side tools
@@ -835,8 +865,10 @@ export namespace AnthropicWire_Tools {
835865 _WebFetchTool_20250910_schema ,
836866 _WebFetchTool_20260209_schema ,
837867 _WebFetchTool_20260309_schema ,
868+ _WebFetchTool_20260318_schema ,
838869 _WebSearchTool_20250305_schema ,
839870 _WebSearchTool_20260209_schema ,
871+ _WebSearchTool_20260318_schema ,
840872 ] ) ;
841873
842874}
@@ -878,7 +910,7 @@ export namespace AnthropicWire_API_Message_Create {
878910 */
879911 const StopDetails_schema = z . object ( {
880912 type : z . enum ( [ 'refusal' ] ) . or ( z . string ( ) ) ,
881- category : z . enum ( [ 'cyber' , 'bio' , 'reasoning_extraction' ] ) . or ( z . string ( ) ) . nullish ( ) ,
913+ category : z . enum ( [ 'cyber' , 'bio' , 'reasoning_extraction' , 'frontier_llm' , 'military_weapons' ] ) . or ( z . string ( ) ) . nullish ( ) ,
882914 explanation : z . string ( ) . nullish ( ) ,
883915 /** [Anthropic, 2026-06-09] Model suggested for a direct retry when a server-side fallback could not run (e.g. fallback model rate-limited). Hint only, may be null. */
884916 recommended_model : z . string ( ) . nullish ( ) ,
0 commit comments