Note
This view is available starting with V4.6.2.1.
Overview
Displays the AI gateway configuration information of the current tenant, allowing you to view the multi-endpoint routing and weight configurations created by using the CREATE_AI_GATEWAY PL statement.
Columns
field |
Type |
Is NULL |
Description |
|---|---|---|---|
| GATEWAY_NAME | varchar(256) | NO | Gateway name. |
| ENDPOINTS | varchar(32767) | NO | JSON list of endpoint routes. Each item contains name, model, weight fields, model is provider/model format. |
| CIRCUIT_BREAKER | varchar(4096) | YES | JSON configuration for gateway-level circuit breaking. |
| CREATE_TIME | timestamp(6) | NO | Creation time. |
| UPDATE_TIME | timestamp(6) | NO | Last modified at. |
Sample query
Query the AI gateway configuration information of the current tenant.
If vendor configuration has not been registered, execute
REGISTER_PROVIDERfirst, and replaceaccess_keyandbase_urlwith the actual values:CALL DBMS_AI_SERVICE.REGISTER_PROVIDER('test-provider', '{ "protocol": "openai", "base_url": "https://xxx", "access_key": "sk-xxx" }'); CALL DBMS_AI_SERVICE.CREATE_AI_GATEWAY('test', '{ "endpoints": [ {"name":"ep1","model":"test-provider/test-model","weight":70}, {"name":"ep2","model":"test-provider/test-model2","weight":30} ] }');Query gateway configuration information:
SELECT GATEWAY_NAME, ENDPOINTS, CIRCUIT_BREAKER FROM oceanbase.DBA_OB_AI_GATEWAYS WHERE GATEWAY_NAME = 'test';The sample result is as follows:
GATEWAY_NAME ENDPOINTS CIRCUIT_BREAKER test [{"name": "ep1", "model": "test-provider/test-model", "weight": 70}, {"name": "ep2", "model": "test-provider/test-model2", "weight": 30}] NULL
Note
To troubleshoot routing configurations by endpoint, query the DBA_OB_AI_GATEWAY_ENDPOINTS view.