add provider_list

This commit is contained in:
Dax Raad
2025-05-28 12:53:22 -04:00
parent 4132fcc1b2
commit 55a6fcdd3f
14 changed files with 458 additions and 76 deletions

View File

@@ -167,16 +167,46 @@
"sessionID": {
"type": "string"
},
"providerID": {
"type": "string"
},
"modelID": {
"type": "string"
},
"parts": {}
},
"required": [
"sessionID"
"sessionID",
"providerID",
"modelID"
]
}
}
}
}
}
},
"/provider_list": {
"post": {
"responses": {
"200": {
"description": "List of providers",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Provider.Info"
}
}
}
}
}
},
"operationId": "postProvider_list",
"parameters": [],
"description": "List all providers"
}
}
},
"components": {
@@ -219,6 +249,64 @@
"title",
"tokens"
]
},
"Provider.Info": {
"type": "object",
"properties": {
"options": {
"type": "object",
"additionalProperties": {}
},
"models": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"cost": {
"type": "object",
"properties": {
"input": {
"type": "number"
},
"inputCached": {
"type": "number"
},
"output": {
"type": "number"
},
"outputCached": {
"type": "number"
}
},
"required": [
"input",
"inputCached",
"output",
"outputCached"
]
},
"contextWindow": {
"type": "number"
},
"maxTokens": {
"type": "number"
},
"attachment": {
"type": "boolean"
}
},
"required": [
"cost",
"contextWindow",
"maxTokens",
"attachment"
]
}
}
}
}
}
}