mirror of
https://github.com/openai/codex.git
synced 2026-05-05 11:57:33 +00:00
feat: expose provider capability bounds to app server clients (#20049)
follow up of #19442. The app server now exposes provider-derived bounds through a new v2 `modelProvider/read` method. The response reports the configured provider map key as `modelProvider` and returns the effective capability booleans so clients can align their UI with the same provider-owned limits used by core.
This commit is contained in:
@@ -1896,6 +1896,9 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ModelProviderCapabilitiesReadParams": {
|
||||
"type": "object"
|
||||
},
|
||||
"NetworkAccess": {
|
||||
"enum": [
|
||||
"restricted",
|
||||
@@ -5478,6 +5481,30 @@
|
||||
"title": "Model/listRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"modelProvider/capabilities/read"
|
||||
],
|
||||
"title": "ModelProvider/capabilities/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/ModelProviderCapabilitiesReadParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "ModelProvider/capabilities/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
|
||||
@@ -1266,6 +1266,30 @@
|
||||
"title": "Model/listRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/v2/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"modelProvider/capabilities/read"
|
||||
],
|
||||
"title": "ModelProvider/capabilities/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/v2/ModelProviderCapabilitiesReadParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "ModelProvider/capabilities/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -11035,6 +11059,32 @@
|
||||
"title": "ModelListResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ModelProviderCapabilitiesReadParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "ModelProviderCapabilitiesReadParams",
|
||||
"type": "object"
|
||||
},
|
||||
"ModelProviderCapabilitiesReadResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"imageGeneration": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"namespaceTools": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"webSearch": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"imageGeneration",
|
||||
"namespaceTools",
|
||||
"webSearch"
|
||||
],
|
||||
"title": "ModelProviderCapabilitiesReadResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ModelRerouteReason": {
|
||||
"enum": [
|
||||
"highRiskCyberActivity"
|
||||
|
||||
@@ -1972,6 +1972,30 @@
|
||||
"title": "Model/listRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/definitions/RequestId"
|
||||
},
|
||||
"method": {
|
||||
"enum": [
|
||||
"modelProvider/capabilities/read"
|
||||
],
|
||||
"title": "ModelProvider/capabilities/readRequestMethod",
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"$ref": "#/definitions/ModelProviderCapabilitiesReadParams"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"method",
|
||||
"params"
|
||||
],
|
||||
"title": "ModelProvider/capabilities/readRequest",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -7689,6 +7713,32 @@
|
||||
"title": "ModelListResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ModelProviderCapabilitiesReadParams": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "ModelProviderCapabilitiesReadParams",
|
||||
"type": "object"
|
||||
},
|
||||
"ModelProviderCapabilitiesReadResponse": {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"imageGeneration": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"namespaceTools": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"webSearch": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"imageGeneration",
|
||||
"namespaceTools",
|
||||
"webSearch"
|
||||
],
|
||||
"title": "ModelProviderCapabilitiesReadResponse",
|
||||
"type": "object"
|
||||
},
|
||||
"ModelRerouteReason": {
|
||||
"enum": [
|
||||
"highRiskCyberActivity"
|
||||
|
||||
5
codex-rs/app-server-protocol/schema/json/v2/ModelProviderCapabilitiesReadParams.json
generated
Normal file
5
codex-rs/app-server-protocol/schema/json/v2/ModelProviderCapabilitiesReadParams.json
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "ModelProviderCapabilitiesReadParams",
|
||||
"type": "object"
|
||||
}
|
||||
21
codex-rs/app-server-protocol/schema/json/v2/ModelProviderCapabilitiesReadResponse.json
generated
Normal file
21
codex-rs/app-server-protocol/schema/json/v2/ModelProviderCapabilitiesReadResponse.json
generated
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"properties": {
|
||||
"imageGeneration": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"namespaceTools": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"webSearch": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"imageGeneration",
|
||||
"namespaceTools",
|
||||
"webSearch"
|
||||
],
|
||||
"title": "ModelProviderCapabilitiesReadResponse",
|
||||
"type": "object"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
5
codex-rs/app-server-protocol/schema/typescript/v2/ModelProviderCapabilitiesReadParams.ts
generated
Normal file
5
codex-rs/app-server-protocol/schema/typescript/v2/ModelProviderCapabilitiesReadParams.ts
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ModelProviderCapabilitiesReadParams = Record<string, never>;
|
||||
5
codex-rs/app-server-protocol/schema/typescript/v2/ModelProviderCapabilitiesReadResponse.ts
generated
Normal file
5
codex-rs/app-server-protocol/schema/typescript/v2/ModelProviderCapabilitiesReadResponse.ts
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
// GENERATED CODE! DO NOT MODIFY BY HAND!
|
||||
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ModelProviderCapabilitiesReadResponse = { namespaceTools: boolean, imageGeneration: boolean, webSearch: boolean, };
|
||||
@@ -234,6 +234,8 @@ export type { Model } from "./Model";
|
||||
export type { ModelAvailabilityNux } from "./ModelAvailabilityNux";
|
||||
export type { ModelListParams } from "./ModelListParams";
|
||||
export type { ModelListResponse } from "./ModelListResponse";
|
||||
export type { ModelProviderCapabilitiesReadParams } from "./ModelProviderCapabilitiesReadParams";
|
||||
export type { ModelProviderCapabilitiesReadResponse } from "./ModelProviderCapabilitiesReadResponse";
|
||||
export type { ModelRerouteReason } from "./ModelRerouteReason";
|
||||
export type { ModelReroutedNotification } from "./ModelReroutedNotification";
|
||||
export type { ModelUpgradeInfo } from "./ModelUpgradeInfo";
|
||||
|
||||
Reference in New Issue
Block a user