/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { WithModelPricing } from "@workglow/ai/worker"; import type { FromSchema } from "@workglow/util/worker"; export declare const OpenAiModelSchema: { readonly type: "object"; readonly properties: { readonly provider: { readonly const: "OPENAI"; readonly description: "Discriminator: OpenAI cloud provider."; }; readonly provider_config: { readonly type: "object"; readonly description: "OpenAI-specific configuration."; readonly properties: { readonly model_name: { readonly type: "string"; readonly description: "The OpenAI model identifier (e.g., 'gpt-4o', 'text-embedding-3-small')."; }; readonly credential_key: { readonly type: "string"; readonly format: "credential"; readonly description: "Key to look up in the credential store for the API key."; readonly "x-ui-hidden": true; }; readonly base_url: { readonly type: "string"; readonly description: "Base URL for the OpenAI API. Useful for Azure OpenAI or proxy servers."; readonly default: "https://api.openai.com/v1"; }; readonly trustedBaseUrl: { readonly type: "boolean"; readonly description: "When true, accept a base_url whose hostname is not in the built-in allow-list. Use only for known-good custom enterprise gateways — otherwise an attacker can exfiltrate the API key by pointing base_url at their own server."; readonly default: false; readonly "x-ui-hidden": true; }; readonly organization: { readonly type: "string"; readonly description: "OpenAI organization ID (optional)."; }; readonly prompt_cache_key: { readonly type: "string"; readonly description: "Overrides the auto-derived Responses prompt_cache_key. Requests sharing a key share a cached prefix; leave unset to derive a stable key from the model + system instructions + tools."; readonly "x-ui-hidden": true; }; readonly reasoning: { readonly type: "object"; readonly description: "Reasoning controls for reasoning-capable models (e.g. the GPT-5.6 sol/terra/luna family), sent on the Responses API."; readonly properties: { readonly effort: { readonly type: "string"; readonly enum: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"]; readonly description: "Reasoning effort. Higher effort trades latency and cost for quality."; }; readonly mode: { readonly type: "string"; readonly enum: readonly ["pro"]; readonly description: "Set to 'pro' for the quality-first pro configuration on supported models."; }; }; readonly additionalProperties: false; }; }; readonly required: readonly ["model_name"]; readonly additionalProperties: false; }; }; readonly required: readonly ["provider", "provider_config"]; readonly additionalProperties: true; }; export declare const OpenAiModelRecordSchema: { readonly type: "object"; readonly properties: { readonly model_id: { readonly type: "string"; }; readonly capabilities: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly "x-ui-editor": "multiselect"; }; readonly title: { readonly type: "string"; }; readonly description: { readonly type: "string"; readonly "x-ui-editor": "textarea"; }; readonly effort: { readonly type: "string"; readonly enum: readonly ["none", "low", "medium", "high", "extra", "ultra"]; readonly description: "Coarse thinking/reasoning dial. Native provider_config thinking knobs always win when set."; }; readonly effort_options: { readonly type: "array"; readonly items: { readonly type: "string"; readonly enum: readonly ["none", "low", "medium", "high", "extra", "ultra"]; }; readonly description: "Enabled coarse effort levels for this model. When present (including empty), overrides provider.effortPolicy for UI."; }; readonly metadata: { readonly type: "object"; readonly default: {}; readonly "x-ui-hidden": true; }; readonly pricing: { readonly type: "object"; }; readonly provider: { readonly const: "OPENAI"; readonly description: "Discriminator: OpenAI cloud provider."; }; readonly provider_config: { readonly type: "object"; readonly description: "OpenAI-specific configuration."; readonly properties: { readonly model_name: { readonly type: "string"; readonly description: "The OpenAI model identifier (e.g., 'gpt-4o', 'text-embedding-3-small')."; }; readonly credential_key: { readonly type: "string"; readonly format: "credential"; readonly description: "Key to look up in the credential store for the API key."; readonly "x-ui-hidden": true; }; readonly base_url: { readonly type: "string"; readonly description: "Base URL for the OpenAI API. Useful for Azure OpenAI or proxy servers."; readonly default: "https://api.openai.com/v1"; }; readonly trustedBaseUrl: { readonly type: "boolean"; readonly description: "When true, accept a base_url whose hostname is not in the built-in allow-list. Use only for known-good custom enterprise gateways — otherwise an attacker can exfiltrate the API key by pointing base_url at their own server."; readonly default: false; readonly "x-ui-hidden": true; }; readonly organization: { readonly type: "string"; readonly description: "OpenAI organization ID (optional)."; }; readonly prompt_cache_key: { readonly type: "string"; readonly description: "Overrides the auto-derived Responses prompt_cache_key. Requests sharing a key share a cached prefix; leave unset to derive a stable key from the model + system instructions + tools."; readonly "x-ui-hidden": true; }; readonly reasoning: { readonly type: "object"; readonly description: "Reasoning controls for reasoning-capable models (e.g. the GPT-5.6 sol/terra/luna family), sent on the Responses API."; readonly properties: { readonly effort: { readonly type: "string"; readonly enum: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"]; readonly description: "Reasoning effort. Higher effort trades latency and cost for quality."; }; readonly mode: { readonly type: "string"; readonly enum: readonly ["pro"]; readonly description: "Set to 'pro' for the quality-first pro configuration on supported models."; }; }; readonly additionalProperties: false; }; }; readonly required: readonly ["model_name"]; readonly additionalProperties: false; }; }; readonly required: readonly ["model_id", "capabilities", "provider", "title", "description", "provider_config", "metadata", "provider", "provider_config"]; readonly additionalProperties: false; }; export type OpenAiModelRecord = WithModelPricing>; export declare const OpenAiModelConfigSchema: { readonly type: "object"; readonly properties: { readonly model_id: { readonly type: "string"; }; readonly capabilities: { readonly type: "array"; readonly items: { readonly type: "string"; }; readonly "x-ui-editor": "multiselect"; }; readonly title: { readonly type: "string"; }; readonly description: { readonly type: "string"; readonly "x-ui-editor": "textarea"; }; readonly effort: { readonly type: "string"; readonly enum: readonly ["none", "low", "medium", "high", "extra", "ultra"]; readonly description: "Coarse thinking/reasoning dial. Native provider_config thinking knobs always win when set."; }; readonly effort_options: { readonly type: "array"; readonly items: { readonly type: "string"; readonly enum: readonly ["none", "low", "medium", "high", "extra", "ultra"]; }; readonly description: "Enabled coarse effort levels for this model. When present (including empty), overrides provider.effortPolicy for UI."; }; readonly metadata: { readonly type: "object"; readonly default: {}; readonly "x-ui-hidden": true; }; readonly pricing: { readonly type: "object"; }; readonly provider: { readonly const: "OPENAI"; readonly description: "Discriminator: OpenAI cloud provider."; }; readonly provider_config: { readonly type: "object"; readonly description: "OpenAI-specific configuration."; readonly properties: { readonly model_name: { readonly type: "string"; readonly description: "The OpenAI model identifier (e.g., 'gpt-4o', 'text-embedding-3-small')."; }; readonly credential_key: { readonly type: "string"; readonly format: "credential"; readonly description: "Key to look up in the credential store for the API key."; readonly "x-ui-hidden": true; }; readonly base_url: { readonly type: "string"; readonly description: "Base URL for the OpenAI API. Useful for Azure OpenAI or proxy servers."; readonly default: "https://api.openai.com/v1"; }; readonly trustedBaseUrl: { readonly type: "boolean"; readonly description: "When true, accept a base_url whose hostname is not in the built-in allow-list. Use only for known-good custom enterprise gateways — otherwise an attacker can exfiltrate the API key by pointing base_url at their own server."; readonly default: false; readonly "x-ui-hidden": true; }; readonly organization: { readonly type: "string"; readonly description: "OpenAI organization ID (optional)."; }; readonly prompt_cache_key: { readonly type: "string"; readonly description: "Overrides the auto-derived Responses prompt_cache_key. Requests sharing a key share a cached prefix; leave unset to derive a stable key from the model + system instructions + tools."; readonly "x-ui-hidden": true; }; readonly reasoning: { readonly type: "object"; readonly description: "Reasoning controls for reasoning-capable models (e.g. the GPT-5.6 sol/terra/luna family), sent on the Responses API."; readonly properties: { readonly effort: { readonly type: "string"; readonly enum: readonly ["none", "minimal", "low", "medium", "high", "xhigh", "max"]; readonly description: "Reasoning effort. Higher effort trades latency and cost for quality."; }; readonly mode: { readonly type: "string"; readonly enum: readonly ["pro"]; readonly description: "Set to 'pro' for the quality-first pro configuration on supported models."; }; }; readonly additionalProperties: false; }; }; readonly required: readonly ["model_name"]; readonly additionalProperties: false; }; }; readonly required: readonly ["provider", "provider_config", "provider", "provider_config"]; readonly additionalProperties: false; }; export type OpenAiModelConfig = WithModelPricing>;