File tree Expand file tree Collapse file tree 1 file changed +21
-18
lines changed
packages/opencode/src/provider Expand file tree Collapse file tree 1 file changed +21
-18
lines changed Original file line number Diff line number Diff line change @@ -121,8 +121,11 @@ export namespace Provider {
121121 }
122122 case "ap" : {
123123 const isAustraliaRegion = [ "ap-southeast-2" , "ap-southeast-4" ] . includes ( region )
124- if ( isAustraliaRegion && modelID . startsWith ( "anthropic.claude-sonnet-4-5" ) ) {
125- modelID = `au.${ modelID } `
124+ if ( isAustraliaRegion && [ "anthropic.claude-sonnet-4-5" , "anthropic.claude-haiku" ] . some ( ( m ) =>
125+ modelID . includes ( m ) ,
126+ ) ) {
127+ regionPrefix = "au"
128+ modelID = `${ regionPrefix } .${ modelID } `
126129 } else {
127130 const modelRequiresPrefix = [ "claude" , "nova-lite" , "nova-micro" , "nova-pro" ] . some ( ( m ) =>
128131 modelID . includes ( m ) ,
@@ -270,31 +273,31 @@ export namespace Provider {
270273 cost :
271274 ! model . cost && ! existing ?. cost
272275 ? {
273- input : 0 ,
274- output : 0 ,
275- cache_read : 0 ,
276- cache_write : 0 ,
277- }
276+ input : 0 ,
277+ output : 0 ,
278+ cache_read : 0 ,
279+ cache_write : 0 ,
280+ }
278281 : {
279- cache_read : 0 ,
280- cache_write : 0 ,
281- ...existing ?. cost ,
282- ...model . cost ,
283- } ,
282+ cache_read : 0 ,
283+ cache_write : 0 ,
284+ ...existing ?. cost ,
285+ ...model . cost ,
286+ } ,
284287 options : {
285288 ...existing ?. options ,
286289 ...model . options ,
287290 } ,
288291 limit : model . limit ??
289292 existing ?. limit ?? {
290- context : 0 ,
291- output : 0 ,
292- } ,
293+ context : 0 ,
294+ output : 0 ,
295+ } ,
293296 modalities : model . modalities ??
294297 existing ?. modalities ?? {
295- input : [ "text" ] ,
296- output : [ "text" ] ,
297- } ,
298+ input : [ "text" ] ,
299+ output : [ "text" ] ,
300+ } ,
298301 provider : model . provider ?? existing ?. provider ,
299302 }
300303 if ( model . id && model . id !== modelID ) {
You can’t perform that action at this time.
0 commit comments