use super::{ApiDialect, RouteId, RouteMethod, RouteSpec, ServiceKind};
macro_rules! native {
($id:ident, $method:ident, $path:literal, $service:ident, $dialect:ident) => {
super::ai_service(
RouteId::$id,
RouteMethod::$method,
$path,
ServiceKind::$service,
ApiDialect::$dialect,
)
};
}
pub(super) const NATIVE_ROUTES: &[RouteSpec] = &[
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/responses/compact",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/responses/input_tokens",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/images/generations",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/images/edits",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/images/variations",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Get,
"/api/services/openai/v1/realtime",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/realtime/client_secrets",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/realtime/calls",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/realtime/calls/{call_id}/accept",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/realtime/calls/{call_id}/hangup",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/realtime/calls/{call_id}/refer",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/realtime/calls/{call_id}/reject",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/audio/speech",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/audio/transcriptions",
OpenAi,
OpenAi
),
native!(
NativeOpenAi,
Post,
"/api/services/openai/v1/audio/translations",
OpenAi,
OpenAi
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/files",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Post,
"/api/services/anthropic/v1/files",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/files/{file_id}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Delete,
"/api/services/anthropic/v1/files/{file_id}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/files/{file_id}/content",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/messages/batches",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Post,
"/api/services/anthropic/v1/messages/batches",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/messages/batches/{batch_id}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Delete,
"/api/services/anthropic/v1/messages/batches/{batch_id}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Post,
"/api/services/anthropic/v1/messages/batches/{batch_id}/cancel",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/messages/batches/{batch_id}/results",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/skills",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Post,
"/api/services/anthropic/v1/skills",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/skills/{skill_id}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Delete,
"/api/services/anthropic/v1/skills/{skill_id}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/skills/{skill_id}/versions",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Post,
"/api/services/anthropic/v1/skills/{skill_id}/versions",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/skills/{skill_id}/versions/{version}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Delete,
"/api/services/anthropic/v1/skills/{skill_id}/versions/{version}",
Anthropic,
Anthropic
),
native!(
NativeAnthropic,
Get,
"/api/services/anthropic/v1/skills/{skill_id}/versions/{version}/content",
Anthropic,
Anthropic
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/responses/compact",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/images/generations",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/images/edits",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/search",
Codex,
OpenAi
),
native!(
NativeCodex,
Get,
"/api/services/codex/v1/realtime",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/realtime/calls",
Codex,
OpenAi
),
native!(
NativeCodex,
Get,
"/api/services/codex/v1/live",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/live",
Codex,
OpenAi
),
native!(
NativeCodex,
Get,
"/api/services/codex/v1/live/{call_id}",
Codex,
OpenAi
),
native!(
NativeCodex,
Get,
"/api/services/codex/v1/user-auth-credential/whoami",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/history/v2/list_windows",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/history/v2/list_items",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/history/v2/read_item",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/history/v2/search_contents",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/notes/v2/thread_hint",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/notes/v2/list_files_by_prefix",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/notes/v2/read_file",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/notes/v2/search_contents",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/notes/v2/append_to_file",
Codex,
OpenAi
),
native!(
NativeCodex,
Post,
"/api/services/codex/v1/alpha/notes/v2/write_file",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/files",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/files/{file_id}/uploaded",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/config/bundle",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/usage",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/rate-limit-reset-credits",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/rate-limit-reset-credits/consume",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/profiles/me",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/usage/thread_usage/query",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/usage/thread-estimates/query",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/settings/user",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/workspace-messages",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/accounts/send_add_credits_nudge_email",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/accounts/verified_access",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/connectors/directory/list",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/connectors/directory/list_workspace",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/ps/apps/batch",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/mcp",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/ps/mcp",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Delete,
"/api/services/codex/backend-api/ps/mcp",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/plugins/featured",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/plugins/{plugin_id}/enable",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/plugins/{plugin_id}/uninstall",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/suggested/codex",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/list",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/workspace/shared",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/installed",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/search",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/{plugin_id}",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/{plugin_id}/skills/{skill}",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/ps/plugins/{plugin_id}/install",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/ps/plugins/{plugin_id}/uninstall",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/ps/plugins/workspace/created",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/public/plugins/workspace/upload-url",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/public/plugins/workspace",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/public/plugins/workspace/{plugin_id}",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Delete,
"/api/services/codex/backend-api/public/plugins/workspace/{plugin_id}",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Put,
"/api/services/codex/backend-api/ps/plugins/{plugin_id}/shares",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/codex/analytics-events/events",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/remote/control/server",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/remote/control/server/enroll",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/remote/control/server/refresh",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/remote/control/server/pair",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Post,
"/api/services/codex/backend-api/wham/remote/control/server/pair/status",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Get,
"/api/services/codex/backend-api/wham/remote/control/environments/{environment_id}/clients",
Codex,
OpenAi
),
native!(
NativeCodexBackend,
Delete,
"/api/services/codex/backend-api/wham/remote/control/environments/{environment_id}/clients/{client_id}",
Codex,
OpenAi
),
];