mirror of
https://github.com/openai/codex.git
synced 2026-04-25 07:05:38 +00:00
feat: retain NetworkProxy, when appropriate (#11207)
As of this PR, `SessionServices` retains a `Option<StartedNetworkProxy>`, if appropriate. Now the `network` field on `Config` is `Option<NetworkProxySpec>` instead of `Option<NetworkProxy>`. Over in `Session::new()`, we invoke `NetworkProxySpec::start_proxy()` to create the `StartedNetworkProxy`, which is a new struct that retains the `NetworkProxy` as well as the `NetworkProxyHandle`. (Note that `Drop` is implemented for `NetworkProxyHandle` to ensure the proxies are shutdown when it is dropped.) The `NetworkProxy` from the `StartedNetworkProxy` is threaded through to the appropriate places. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/11207). * #11285 * __->__ #11207
This commit is contained in:
@@ -887,6 +887,17 @@
|
||||
"model_provider_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"network_proxy": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/SessionNetworkProxyRuntime"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"description": "Runtime proxy bind addresses, when the managed proxy was started for this session."
|
||||
},
|
||||
"reasoning_effort": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -4427,6 +4438,25 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"SessionNetworkProxyRuntime": {
|
||||
"properties": {
|
||||
"admin_addr": {
|
||||
"type": "string"
|
||||
},
|
||||
"http_addr": {
|
||||
"type": "string"
|
||||
},
|
||||
"socks_addr": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"admin_addr",
|
||||
"http_addr",
|
||||
"socks_addr"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SkillDependencies": {
|
||||
"properties": {
|
||||
"tools": {
|
||||
@@ -5186,4 +5216,4 @@
|
||||
],
|
||||
"title": "ResumeConversationResponse",
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user