mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
default model
This commit is contained in:
parent
a5f8d38c3a
commit
01149d85bc
1 changed files with 7 additions and 0 deletions
|
|
@ -92,6 +92,13 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
|||
})
|
||||
|
||||
const fallback = createMemo(() => {
|
||||
if (sync.data.config.model) {
|
||||
const [providerID, modelID] = sync.data.config.model.split("/")
|
||||
return {
|
||||
providerID,
|
||||
modelID,
|
||||
}
|
||||
}
|
||||
if (store.recent.length) return store.recent[0]
|
||||
const provider = sync.data.provider[0]
|
||||
const model = Object.values(provider.models)[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue