mirror of
https://github.com/openai/codex.git
synced 2026-11-25 15:24:26 +00:00
feat: add experimental_bearer_token option to model provider definition (#5467)
While we do not want to encourage users to hardcode secrets in their `config.toml` file, it should be possible to pass an API key programmatically. For example, when using `codex app-server`, it is possible to pass a "bag of configuration" as part of the `NewConversationParams`: https://github.com/openai/codex/blob/682d05512f2992dd0657f1078d4146f15c744d7a/codex-rs/app-server-protocol/src/protocol.rs#L248-L251 When using `codex app-server`, it's not practical to change env vars of the `codex app-server` process on the fly (which is how we usually read API key values), so this helps with that.
This commit is contained in:
1 parent
682d05512f
commit
404cae7d40
9 files changed
+39
-8
No files matched your search
@@ -50,6 +50,7 @@ async fn run_request(input: Vec<ResponseItem>) -> Value {
|
||||
base_url: Some(format!("{}/v1", server.uri())),
|
||||
env_key: None,
|
||||
env_key_instructions: None,
|
||||
experimental_bearer_token: None,
|
||||
wire_api: WireApi::Chat,
|
||||
query_params: None,
|
||||
http_headers: None,
|
||||
|
||||
Reference in new issue
Block a user