File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
packages/opencode/src/provider Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import { Log } from "../util/log"
22import { Env } from "../env"
33import type { Provider } from "./provider"
4+ import { ModelID , ProviderID } from "./schema"
45
56export namespace LiteLLM {
67 const log = Log . create ( { service : "litellm" } )
@@ -75,8 +76,8 @@ export namespace LiteLLM {
7576 const supportsTemperature = info . supported_openai_params ?. includes ( "temperature" ) ?? true
7677
7778 return {
78- id : entry . model_name ,
79- providerID : "litellm" ,
79+ id : ModelID . make ( entry . model_name ) ,
80+ providerID : ProviderID . make ( "litellm" ) ,
8081 name : entry . model_name ,
8182 api : {
8283 id : entry . model_name ,
@@ -133,8 +134,8 @@ export namespace LiteLLM {
133134
134135 function toBasicModel ( id : string ) : Provider . Model {
135136 return {
136- id,
137- providerID : "litellm" ,
137+ id : ModelID . make ( id ) ,
138+ providerID : ProviderID . make ( "litellm" ) ,
138139 name : id ,
139140 api : { id, url : "" , npm : "@ai-sdk/openai-compatible" } ,
140141 status : "active" ,
Original file line number Diff line number Diff line change @@ -947,7 +947,7 @@ export namespace Provider {
947947 // Seed LiteLLM provider so it is always available for interactive configuration
948948 if ( ! database [ "litellm" ] ) {
949949 database [ "litellm" ] = {
950- id : "litellm" ,
950+ id : ProviderID . make ( "litellm" ) ,
951951 name : "LiteLLM" ,
952952 env : [ "LITELLM_API_KEY" ] ,
953953 options : { } ,
You can’t perform that action at this time.
0 commit comments