feat: add model reconciliation hook
This commit is contained in:
parent
3f1c96a0bb
commit
c32c2e8a8f
2 changed files with 14 additions and 3 deletions
|
|
@ -159,6 +159,16 @@ export type AuthOuathResult = { url: string; instructions: string } & (
|
|||
}
|
||||
)
|
||||
|
||||
export type ProviderHook = {
|
||||
id: string
|
||||
models?: {
|
||||
reconcile?: (input: {
|
||||
provider: Provider
|
||||
models: Record<string, Model>
|
||||
}) => Promise<Record<string, Model> | undefined>
|
||||
}
|
||||
}
|
||||
|
||||
export interface Hooks {
|
||||
event?: (input: { event: Event }) => Promise<void>
|
||||
config?: (input: Config) => Promise<void>
|
||||
|
|
@ -166,6 +176,7 @@ export interface Hooks {
|
|||
[key: string]: ToolDefinition
|
||||
}
|
||||
auth?: AuthHook
|
||||
provider?: ProviderHook
|
||||
/**
|
||||
* Called when a new message is received
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue