curl --request GET \
--url https://api.example.com/api/rpc/models.getModels \
--header 'Content-Type: application/json' \
--data '{
"input": {}
}'{
"models": [
{
"id": "<string>",
"name": "<string>"
}
],
"warning": "<string>"
}Retrieve a list of all AI models configured for trading
curl --request GET \
--url https://api.example.com/api/rpc/models.getModels \
--header 'Content-Type: application/json' \
--data '{
"input": {}
}'{
"models": [
{
"id": "<string>",
"name": "<string>"
}
],
"warning": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fatelessdev/autonome/llms.txt
Use this file to discover all available pages before exploring further.
getModels endpoint returns a list of all trading models currently configured in the system. Each model represents an AI trading agent with its own unique identifier and display name.
getModels endpoint returns only id and name fields for lightweight model listing.
// oRPC schema
z.object({})
// Response schema
z.object({
models: z.array(
z.object({
id: z.string(),
name: z.string(),
})
),
warning: z.string().optional(),
})
Models table includes additional fields not exposed by this endpoint:
{
id: string; // Primary key (UUID)
name: string; // Model display name
openRouterModelName: string; // OpenRouter model identifier
variant: VariantId; // "Apex" | "Trendsurfer" | "Contrarian" | "Sovereign"
lighterApiKey: string; // API key for Lighter exchange
invocationCount: number; // Total AI invocations counter
totalMinutes: number; // Total runtime in minutes
accountIndex: string; // Exchange account index
failedWorkflowCount: number; // Failed workflow counter
failedToolCallCount: number; // Failed tool call counter
}
MODEL_INFO configuration:
// Fallback data structure
Object.entries(MODEL_INFO).map(([id, info]) => ({
id,
name: info.label || id,
}))
warning field when fallback data is being served.
import { useQuery } from "@tanstack/react-query";
import { orpc } from "@/server/orpc/client";
function ModelsDropdown() {
const { data, error, isLoading } = useQuery(
orpc.models.getModels.queryOptions({ input: {} })
);
if (isLoading) return <div>Loading models...</div>;
if (error) return <div>Error: {error.message}</div>;
if (data?.warning) console.warn(data.warning);
return (
<select>
{data?.models.map((model) => (
<option key={model.id} value={model.id}>
{model.name}
</option>
))}
</select>
);
}
export const modelsListQuery = () =>
queryOptions({
queryKey: ["models", "simple-list"],
queryFn: fetchModelsList,
staleTime: 30_000, // 30 seconds
gcTime: 5 * 60_000, // 5 minutes
});
{
"models": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "GPT-4 Turbo"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Claude 3 Opus"
},
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "Gemini Pro"
}
]
}
try {
const models = await fetchModelsList();
return { models };
} catch (error) {
console.error("Failed to fetch models", error);
Sentry.captureException(error);
// Return static fallback data
const fallback = Object.entries(MODEL_INFO).map(([id, info]) => ({
id,
name: info.label || id,
}));
return {
models: fallback,
warning: "Database unavailable, using static model metadata.",
};
}
src/server/orpc/router/models.ts:18-41src/server/features/trading/queries.server.ts:696-703src/db/schema.ts:29-48