Skip to content

Commit 6b1d6ec

Browse files
authored
Merge branch 'main' into dependabot/uv/aiohttp-3.14.0
2 parents 30a6957 + 7039845 commit 6b1d6ec

282 files changed

Lines changed: 178492 additions & 1090 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ contact_links:
44
- name: Have you read the docs?
55
url: https://ogx-ai.github.io/docs
66
about: Much help can be found in the docs
7-
- name: Chat on Slack
8-
url: https://join.slack.com/t/ogx-ai/shared_invite/zt-3uyw5bxj9-tSEwsNZncgkGEKbd4dXIpw
9-
about: Maybe chatting with the community can help
7+
- name: Join the Discord community
8+
url: https://discord.gg/bUYRqEvK6
9+
about: Ask questions and chat with the community

.github/actions/run-and-record-tests/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ inputs:
2424
description: 'Regex pattern to pass to pytest -k'
2525
required: false
2626
default: ''
27+
text-model:
28+
description: 'Text model override to pass to integration-tests.sh'
29+
required: false
30+
default: ''
2731
target-branch:
2832
description: 'Target branch for recording commits (for PRs, use the PR head branch)'
2933
required: false
@@ -56,6 +60,7 @@ runs:
5660
INPUT_SUITE: ${{ inputs.suite }}
5761
INPUT_SUBDIRS: ${{ inputs.subdirs }}
5862
INPUT_PATTERN: ${{ inputs.pattern }}
63+
INPUT_TEXT_MODEL: ${{ inputs.text-model }}
5964
run: |
6065
SCRIPT_ARGS="--stack-config ${INPUT_STACK_CONFIG} --inference-mode ${INPUT_INFERENCE_MODE}"
6166
@@ -72,6 +77,9 @@ runs:
7277
if [ -n "${INPUT_PATTERN}" ]; then
7378
SCRIPT_ARGS="${SCRIPT_ARGS} --pattern ${INPUT_PATTERN}"
7479
fi
80+
if [ -n "${INPUT_TEXT_MODEL}" ]; then
81+
SCRIPT_ARGS="${SCRIPT_ARGS} --text-model ${INPUT_TEXT_MODEL}"
82+
fi
7583
7684
echo "=== Running command ==="
7785
echo "uv run --no-sync ./scripts/integration-tests.sh $SCRIPT_ARGS"

.github/workflows/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ OGX uses GitHub Actions for Continuous Integration (CI). Below is a table detail
1717
| Integration Auth Tests | [integration-auth-tests.yml](integration-auth-tests.yml) | Run the integration test suite with Kubernetes authentication |
1818
| Integration Responses, Conversations & Prompts Auth Tests | [integration-responses-conversations-auth-tests.yml](integration-responses-conversations-auth-tests.yml) | Run responses, conversations, and prompts auth tests with Kubernetes authentication |
1919
| SqlStore Integration Tests | [integration-sql-store-tests.yml](integration-sql-store-tests.yml) | Run the integration test suite with SqlStore |
20-
| Messages API - Claude Code CLI Smoke Test | [integration-tests-messages-cli.yml](integration-tests-messages-cli.yml) | Drive the real Claude Code CLI against /v1/messages (live, Ollama) |
20+
| Responses API - Codex CLI Smoke Test | [integration-tests-codex-cli.yml](integration-tests-codex-cli.yml) | Manually drive the real Codex CLI against /v1/responses |
21+
| Messages API - Claude Code Client Smoke Tests | [integration-tests-messages-clients.yml](integration-tests-messages-clients.yml) | Drive the Claude Code CLI and Agent SDK against /v1/messages (live, Ollama) |
2122
| Integration Tests (Replay) | [integration-tests.yml](integration-tests.yml) | Run the integration test suites from tests/integration in replay mode |
2223
| Vector IO Integration Tests | [integration-vector-io-tests.yml](integration-vector-io-tests.yml) | Run the integration test suite with various VectorIO providers |
2324
| OpenAPI Generator SDK Validation | [openapi-generator-validation.yml](openapi-generator-validation.yml) | Validate OpenAPI Generator SDK generation |

.github/workflows/backward-compat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
python-version: '3.12'
4242

4343
- name: Install uv
44-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
44+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
4545
with:
4646
enable-cache: true
4747

@@ -451,7 +451,7 @@ jobs:
451451
python-version: '3.12'
452452

453453
- name: Install uv
454-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
454+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
455455
with:
456456
enable-cache: true
457457

.github/workflows/ci-status.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ jobs:
4343
const excludedApps = new Set(['mergify']);
4444
4545
const terminalStatuses = new Set(['completed']);
46-
const successConclusions = new Set(['success', 'skipped', 'neutral']);
47-
const failureConclusions = new Set(['failure', 'cancelled', 'timed_out']);
46+
const successConclusions = new Set(['success', 'skipped', 'neutral', 'cancelled']);
47+
const failureConclusions = new Set(['failure', 'timed_out']);
4848
4949
while (true) {
5050
const { data: checkRuns } = await github.rest.checks.listForRef({

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
# Initializes CodeQL tools for scanning.
2525
- name: Initialize CodeQL
26-
uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3
26+
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3
2727
with:
2828
languages: ${{ matrix.language }}
2929
# "security-extended" is recommended for higher severity coverage - not necessary can be removed to speed up
@@ -32,6 +32,6 @@ jobs:
3232
# Scans the code and uploads results to GitHub Security tab.
3333
# The "Fail on High" logic is handled by Branch Protection Rules in Settings
3434
- name: Perform CodeQL Analysis
35-
uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3
35+
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v3
3636
with:
3737
category: "/language:${{ matrix.language }}"

.github/workflows/dependabot-constraints.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
python-version: '3.12'
4545

4646
- name: Set up uv
47-
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
47+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
4848

4949
- name: Parse dependency info from Dependabot commit
5050
id: parse
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Responses API - Codex CLI Smoke Test
2+
3+
run-name: Manually drive the real Codex CLI against /v1/responses
4+
5+
on:
6+
# Keep this manual until local providers can complete a clean Codex turn.
7+
# See https://github.com/ogx-ai/ogx/issues/6069.
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
env:
18+
CODEX_CLI_VERSION: '0.136.0'
19+
CODEX_SMOKE_TEXT_MODEL: 'ollama/llama3.2:1b'
20+
21+
jobs:
22+
codex-cli-smoke:
23+
name: Codex CLI smoke (ollama, live)
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 30
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30+
with:
31+
persist-credentials: false
32+
33+
# Live mode (not replay) so the Ollama backend is provisioned and the
34+
# real Codex CLI traffic reaches a real model through /v1/responses.
35+
- name: Setup test environment
36+
uses: ./.github/actions/setup-test-environment
37+
with:
38+
python-version: '3.12'
39+
client-version: 'latest'
40+
setup: 'ollama'
41+
suite: 'responses'
42+
inference-mode: 'live'
43+
44+
- name: Install Codex CLI
45+
run: |
46+
npm install -g "@openai/codex@${CODEX_CLI_VERSION}"
47+
codex --version
48+
49+
- name: Pull Codex smoke model
50+
run: docker exec ollama ollama pull "${CODEX_SMOKE_TEXT_MODEL#ollama/}"
51+
52+
- name: Run Codex CLI smoke test
53+
uses: ./.github/actions/run-and-record-tests
54+
env:
55+
OGX_ENABLE_CODEX_CLI_SMOKE: '1'
56+
with:
57+
stack-config: 'server:ci-tests'
58+
setup: 'ollama'
59+
suite: 'responses'
60+
inference-mode: 'live'
61+
pattern: 'test_codex_cli_smoke_uses_generated_ogx_profile'
62+
text-model: ${{ env.CODEX_SMOKE_TEXT_MODEL }}

.github/workflows/integration-tests-messages-cli.yml renamed to .github/workflows/integration-tests-messages-clients.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Messages API - Claude Code CLI Smoke Test
1+
name: Messages API - Claude Code Client Smoke Tests
22

3-
run-name: Drive the real Claude Code CLI against /v1/messages (live, Ollama)
3+
run-name: Drive the Claude Code CLI and Agent SDK against /v1/messages (live, Ollama)
44

55
on:
66
push:
@@ -18,7 +18,7 @@ on:
1818
- 'tests/integration/messages/**'
1919
- 'uv.lock'
2020
- 'pyproject.toml'
21-
- '.github/workflows/integration-tests-messages-cli.yml'
21+
- '.github/workflows/integration-tests-messages-clients.yml'
2222
- '.github/actions/setup-test-environment/action.yml'
2323
- '.github/actions/run-and-record-tests/action.yml'
2424
- 'scripts/integration-tests.sh'
@@ -36,27 +36,31 @@ permissions:
3636
contents: read
3737

3838
env:
39-
# Pinned for reproducibility. The CLI bakes the cwd, date, and platform into
40-
# every request body, so its traffic cannot be recorded/replayed; this test
41-
# runs live against Ollama instead. Bumping only changes the client behavior
42-
# under test, not any committed recordings.
39+
# Pinned for reproducibility. Both clients ultimately drive the Claude Code
40+
# CLI, which bakes the cwd, date, and platform into every request body, so
41+
# their traffic cannot be recorded/replayed; these tests run live against
42+
# Ollama instead. Bumping only changes the client behavior under test.
4343
CLAUDE_CODE_CLI_VERSION: '2.1.159'
44+
# The Agent SDK is installed at workflow time rather than as a project
45+
# dependency, since only this one live smoke test uses it; it spawns the same
46+
# CLI. The SDK test self-skips if the package is unavailable.
47+
CLAUDE_AGENT_SDK_VERSION: '0.2.87'
4448

4549
jobs:
46-
claude-code-cli-smoke:
47-
name: Claude Code CLI smoke (ollama, live)
50+
claude-code-client-smoke:
51+
name: Claude Code CLI + Agent SDK smoke (ollama, live)
4852
runs-on: ubuntu-latest
49-
# CPU-only runners generate slowly; the live CLI session can take several
50-
# minutes against the Ollama model. Keep ample headroom over the test's own
51-
# 600s subprocess timeout plus environment setup.
53+
# CPU-only runners generate slowly; the live sessions can take several
54+
# minutes against the Ollama model. Keep ample headroom over the tests' own
55+
# 600s timeouts plus environment setup.
5256
timeout-minutes: 30
5357

5458
steps:
5559
- name: Checkout repository
5660
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5761

58-
# Live mode (not replay) so the Ollama backend is provisioned and the
59-
# real CLI traffic reaches a real model.
62+
# Live mode (not replay) so the Ollama backend is provisioned and the real
63+
# client traffic reaches a real model.
6064
- name: Setup test environment
6165
uses: ./.github/actions/setup-test-environment
6266
with:
@@ -66,17 +70,26 @@ jobs:
6670
suite: 'messages'
6771
inference-mode: 'live'
6872

73+
# Both clients need the Claude Code CLI at runtime: the CLI test invokes it
74+
# directly, and the SDK spawns it as a subprocess.
6975
- name: Install Claude Code CLI
7076
run: |
7177
curl -fsSL https://claude.ai/install.sh | bash -s -- "${CLAUDE_CODE_CLI_VERSION}"
7278
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
7379
"$HOME/.local/bin/claude" --version
7480
75-
- name: Run Claude Code CLI smoke test
81+
- name: Install Claude Agent SDK
82+
run: uv pip install "claude-agent-sdk==${CLAUDE_AGENT_SDK_VERSION}"
83+
84+
- name: Run Claude Code client smoke tests
7685
uses: ./.github/actions/run-and-record-tests
7786
with:
7887
stack-config: 'server:ci-tests'
7988
setup: 'ollama'
8089
suite: 'messages'
8190
inference-mode: 'live'
82-
pattern: 'test_claude_code_cli_smoke'
91+
# Selects both test_claude_code_cli_smoke and test_claude_agent_sdk_smoke.
92+
# Must stay a single shell word: run-and-record-tests passes --pattern
93+
# unquoted, so a -k expression with spaces would be split into separate
94+
# arguments.
95+
pattern: 'test_claude'

.github/workflows/integration-vector-io-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,23 @@ jobs:
195195
docker logs infinispan
196196
exit 1
197197
198+
- name: Cache Hugging Face models
199+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
200+
with:
201+
path: ~/.cache/huggingface
202+
key: hf-${{ runner.os }}-${{ matrix.python-version }}-nomic-embed-text-v1.5
203+
198204
- name: Build OGX
199205
run: |
200206
uv run --no-sync ogx stack list-deps ci-tests | xargs -L1 uv pip install
201207
208+
- name: Pre-download embedding model
209+
run: |
210+
uv run --no-sync python - <<'PY'
211+
from sentence_transformers import SentenceTransformer
212+
SentenceTransformer("nomic-ai/nomic-embed-text-v1.5", trust_remote_code=True)
213+
PY
214+
202215
- name: Check Storage and Memory Available Before Tests
203216
if: ${{ always() }}
204217
run: |
@@ -207,6 +220,8 @@ jobs:
207220
208221
- name: Run Vector IO Integration Tests
209222
env:
223+
HF_HUB_OFFLINE: "1"
224+
TRANSFORMERS_OFFLINE: "1"
210225
ENABLE_CHROMADB: ${{ matrix.vector-io-provider == 'remote::chromadb' && 'true' || '' }}
211226
CHROMADB_URL: ${{ matrix.vector-io-provider == 'remote::chromadb' && 'http://localhost:8000' || '' }}
212227
ENABLE_PGVECTOR: ${{ matrix.vector-io-provider == 'remote::pgvector' && 'true' || '' }}

0 commit comments

Comments
 (0)