Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor: replace inline api.model with register_schema_models in billing (#34928)
NVIDIAN9069c01f9cea
diff --git a/api/controllers/console/billing/billing.py b/api/controllers/console/billing/billing.pyindex 23c01eedb1d..45de338559a 100644--- a/api/controllers/console/billing/billing.py+++ b/api/controllers/console/billing/billing.py@@ -2,18 +2,17 @@ import base64from typing import Literalfrom flask import request-from flask_restx import Resource, fields+from flask_restx import Resourcefrom pydantic import BaseModel, Fieldfrom werkzeug.exceptions import BadRequest+from controllers.common.schema import register_schema_modelsfrom controllers.console import console_nsfrom controllers.console.wraps import account_initialization_required, only_edition_cloud, setup_requiredfrom enums.cloud_plan import CloudPlanfrom libs.login import current_account_with_tenant, login_requiredfrom services.billing_service import BillingService-DEFAULT_REF_TEMPLATE_SWAGGER_2_0 = "#/definitions/{model}"-class SubscriptionQuery(BaseModel):plan: Literal[CloudPlan.PROFESSIONAL, CloudPlan.TEAM] = Field(..., description="Subscription plan")@@ -24,8 +23,7 @@ class PartnerTenantsPayload(BaseModel):click_id: str = Field(..., description="Click Id from partner referral link")-for model in (SubscriptionQuery, PartnerTenantsPayload):- console_ns.schema_model(model.__name__, model.model_json_schema(ref_template=DEFAULT_REF_TEMPLATE_SWAGGER_2_0))+register_schema_models(console_ns, SubscriptionQuery, PartnerTenantsPayload)@console_ns.route("/billing/subscription")@@ -58,12 +56,7 @@ class PartnerTenants(Resource):@console_ns.doc("sync_partner_tenants_bindings")@console_ns.doc(description="Sync partner tenants bindings")@console_ns.doc(params={"partner_key": "Partner key"})- @console_ns.expect(- console_ns.model(- "SyncPartnerTenantsBindingsRequest",- {"click_id": fields.String(required=True, description="Click Id from partner referral link")},- )- )+ @console_ns.expect(console_ns.models[PartnerTenantsPayload.__name__])@console_ns.response(200, "Tenants synced to partner successfully")@console_ns.response(400, "Invalid partner information")@setup_required