Models
Import LiteLLM
Bulk-imports a list of LiteLLM model definitions into the workspace model garden.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.models.import_litellm(request=[
{
"litellm_params": {
"merge_reasoning_content_in_choices": False,
"model": "openai/gpt-6-astra",
"use_in_pass_through": False,
"use_litellm_proxy": False,
},
"model_info": {
"db_model": True,
"id": "<id>",
"key": "<key>",
"litellm_provider": "<value>",
"mode": "<value>",
},
"model_name": "<value>",
},
])
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.models.importLitellm([
{
litellmParams: {
mergeReasoningContentInChoices: false,
model: "openai/gpt-6-astra",
useInPassThrough: false,
useLitellmProxy: false,
},
modelInfo: {
dbModel: true,
id: "<id>",
key: "<key>",
litellmProvider: "<value>",
mode: "<value>",
},
modelName: "<value>",
},
]);
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"request": List[LiteLLMModel], # required
}
// orq.models.importLitellm(request)
List LiteLLM
Fetches the list of models from the LiteLLM instance configured for the workspace. Requires a stored LiteLLM integration.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.models.list_litellm()
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.models.listLitellm();
console.log(result);
}
run();