5 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2a06d64bc9
|
feat: add support for building with Bazel (#8875)
This PR configures Codex CLI so it can be built with [Bazel](https://bazel.build) in addition to Cargo. The `.bazelrc` includes configuration so that remote builds can be done using [BuildBuddy](https://www.buildbuddy.io). If you are familiar with Bazel, things should work as you expect, e.g., run `bazel test //... --keep-going` to run all the tests in the repo, but we have also added some new aliases in the `justfile` for convenience: - `just bazel-test` to run tests locally - `just bazel-remote-test` to run tests remotely (currently, the remote build is for x86_64 Linux regardless of your host platform). Note we are currently seeing the following test failures in the remote build, so we still need to figure out what is happening here: ``` failures: suite::compact::manual_compact_twice_preserves_latest_user_messages suite::compact_resume_fork::compact_resume_after_second_compaction_preserves_history suite::compact_resume_fork::compact_resume_and_fork_preserve_model_history_view ``` - `just build-for-release` to build release binaries for all platforms/architectures remotely To setup remote execution: - [Create a buildbuddy account](https://app.buildbuddy.io/) (OpenAI employees should also request org access at https://openai.buildbuddy.io/join/ with their `@openai.com` email address.) - [Copy your API key](https://app.buildbuddy.io/docs/setup/) to `~/.bazelrc` (add the line `build --remote_header=x-buildbuddy-api-key=YOUR_KEY`) - Use `--config=remote` in your `bazel` invocations (or add `common --config=remote` to your `~/.bazelrc`, or use the `just` commands) ## CI In terms of CI, this PR introduces `.github/workflows/bazel.yml`, which uses Bazel to run the tests _locally_ on Mac and Linux GitHub runners (we are working on supporting Windows, but that is not ready yet). Note that the failures we are seeing in `just bazel-remote-test` do not occur on these GitHub CI jobs, so everything in `.github/workflows/bazel.yml` is green right now. The `bazel.yml` uses extra config in `.github/workflows/ci.bazelrc` so that macOS CI jobs build _remotely_ on Linux hosts (using the `docker://docker.io/mbolin491/codex-bazel` Docker image declared in the root `BUILD.bazel`) using cross-compilation to build the macOS artifacts. Then these artifacts are downloaded locally to GitHub's macOS runner so the tests can be executed natively. This is the relevant config that enables this: ``` common:macos --config=remote common:macos --strategy=remote common:macos --strategy=TestRunner=darwin-sandbox,local ``` Because of the remote caching benefits we get from BuildBuddy, these new CI jobs can be extremely fast! For example, consider these two jobs that ran all the tests on Linux x86_64: - Bazel 1m37s https://github.com/openai/codex/actions/runs/20861063212/job/59940545209?pr=8875 - Cargo 9m20s https://github.com/openai/codex/actions/runs/20861063192/job/59940559592?pr=8875 For now, we will continue to run both the Bazel and Cargo jobs for PRs, but once we add support for Windows and running Clippy, we should be able to cutover to using Bazel exclusively for PRs, which should still speed things up considerably. We will probably continue to run the Cargo jobs post-merge for commits that land on `main` as a sanity check. Release builds will also continue to be done by Cargo for now. Earlier attempt at this PR: https://github.com/openai/codex/pull/8832 Earlier attempt to add support for Buck2, now abandoned: https://github.com/openai/codex/pull/8504 --------- Co-authored-by: David Zbarsky <dzbarsky@gmail.com> Co-authored-by: Michael Bolin <mbolin@openai.com> |
||
|
|
cb9a189857
|
make model optional in config (#7769)
- Make Config.model optional and centralize default-selection logic in ModelsManager, including a default_model helper (with codex-auto-balanced when available) so sessions now carry an explicit chosen model separate from the base config. - Resolve `model` once in `core` and `tui` from config. Then store the state of it on other structs. - Move refreshing models to be before resolving the default model |
||
|
|
cb85a7b96e
|
chore(deps): bump tracing from 0.1.41 to 0.1.43 in /codex-rs (#7428)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.41 to 0.1.43. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tracing/releases">tracing's releases</a>.</em></p> <blockquote> <h2>tracing 0.1.43</h2> <h4>Important</h4> <p>The previous release [0.1.42] was yanked because <a href="https://redirect.github.com/tokio-rs/tracing/issues/3382">#3382</a> was a breaking change. See further details in <a href="https://redirect.github.com/tokio-rs/tracing/issues/3424">#3424</a>. This release contains all the changes from that version, plus a revert for the problematic part of the breaking PR.</p> <h3>Fixed</h3> <ul> <li>Revert "make <code>valueset</code> macro sanitary" (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3425">#3425</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tracing/issues/3382">#3382</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3382">tokio-rs/tracing#3382</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3424">#3424</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3424">tokio-rs/tracing#3424</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3425">#3425</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/3425">tokio-rs/tracing#3425</a> [0.1.42]: <a href="https://github.com/tokio-rs/tracing/releases/tag/tracing-0.1.42">https://github.com/tokio-rs/tracing/releases/tag/tracing-0.1.42</a></p> <h2>tracing 0.1.42</h2> <h3>Important</h3> <p>The [<code>Span::record_all</code>] method has been removed from the documented API. It was always unsuable via the documented API as it requried a <code>ValueSet</code> which has no publically documented constructors. The method remains, but should not be used outside of <code>tracing</code> macros.</p> <h3>Added</h3> <ul> <li><strong>attributes</strong>: Support constant expressions as instrument field names (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3158">#3158</a>)</li> <li>Add <code>record_all!</code> macro for recording multiple values in one call (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3227">#3227</a>)</li> <li><strong>core</strong>: Improve code generation at trace points significantly (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3398">#3398</a>)</li> </ul> <h3>Changed</h3> <ul> <li><code>tracing-core</code>: updated to 0.1.35 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3414">#3414</a>)</li> <li><code>tracing-attributes</code>: updated to 0.1.31 (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3417">#3417</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>Fix "name / parent" variant of <code>event!</code> (<a href="https://redirect.github.com/tokio-rs/tracing/issues/2983">#2983</a>)</li> <li>Remove 'r#' prefix from raw identifiers in field names (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3130">#3130</a>)</li> <li>Fix perf regression when <code>release_max_level_*</code> not set (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3373">#3373</a>)</li> <li>Use imported instead of fully qualified path (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3374">#3374</a>)</li> <li>Make <code>valueset</code> macro sanitary (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3382">#3382</a>)</li> </ul> <h3>Documented</h3> <ul> <li><strong>core</strong>: Add missing <code>dyn</code> keyword in <code>Visit</code> documentation code sample (<a href="https://redirect.github.com/tokio-rs/tracing/issues/3387">#3387</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tracing/issues/2983">#2983</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#2983%5D(https://redirect.github.com/tokio-rs/tracing/issues/2983)">tokio-rs/tracing#2983</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3130">#3130</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3130%5D(https://redirect.github.com/tokio-rs/tracing/issues/3130)">tokio-rs/tracing#3130</a> <a href="https://redirect.github.com/tokio-rs/tracing/issues/3158">#3158</a>: <a href="https://redirect.github.com/tokio-rs/tracing/pull/%5B#3158%5D(https://redirect.github.com/tokio-rs/tracing/issues/3158)">tokio-rs/tracing#3158</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
ec49b56874
|
chore: add cargo-deny configuration (#7119)
- add GitHub workflow running cargo-deny on push/PR - document cargo-deny allowlist with workspace-dep notes and advisory ignores - align workspace crates to inherit version/edition/license for consistent checks |
||
|
|
837bc98a1d
|
LM Studio OSS Support (#2312)
## Overview Adds LM Studio OSS support. Closes #1883 ### Changes This PR enhances the behavior of `--oss` flag to support LM Studio as a provider. Additionally, it introduces a new flag`--local-provider` which can take in `lmstudio` or `ollama` as values if the user wants to explicitly choose which one to use. If no provider is specified `codex --oss` will auto-select the provider based on whichever is running. #### Additional enhancements The default can be set using `oss-provider` in config like: ``` oss_provider = "lmstudio" ``` For non-interactive users, they will need to either provide the provider as an arg or have it in their `config.toml` ### Notes For best performance, [set the default context length](https://lmstudio.ai/docs/app/advanced/per-model) for gpt-oss to the maximum your machine can support --------- Co-authored-by: Matt Clayton <matt@lmstudio.ai> Co-authored-by: Eric Traut <etraut@openai.com> |