Skip to content

Route Codex through MLflow OSS gateway for Kimi models#180

Open
lilly-luo wants to merge 1 commit into
mainfrom
lilly/kimi-codex-agent
Open

Route Codex through MLflow OSS gateway for Kimi models#180
lilly-luo wants to merge 1 commit into
mainfrom
lilly/kimi-codex-agent

Conversation

@lilly-luo

Copy link
Copy Markdown
Collaborator

This change lets Codex route through Databricks model-service OSS models (e.g. "system.ai.kimi-k2-7-code") by switching the base URL to /ai-gateway/mlflow/v1 while keeping the OpenAI Responses wire API.

Changes:

  • Detects OSS/Kimi models and picks the MLflow gateway base URL.
  • Falls back to the first OSS model when no GPT model is available.
  • Adds a --model option to ucode codex for explicit model pinning.
  • Codex availability now includes oss_models; OSS discovery is fetched when configuring Codex.

Tested:

  • uv run pytest tests/test_agent_codex.py tests/test_agents_init.py tests/test_cli.py — 205 passed
  • uv run ruff check . — clean

@lilly-luo lilly-luo force-pushed the lilly/kimi-codex-agent branch from bb93069 to 1dc24f4 Compare July 2, 2026 14:55
Codex can now use Databricks model-service OSS models (system.ai.kimi-*) by routing to /ai-gateway/mlflow/v1 while keeping wire_api=responses.

- Detects OSS/Kimi models and picks the MLflow base URL.

- Falls back to the first OSS model when no GPT model is available.

- Adds --model option to ucode codex for explicit model pinning.

- Codex availability now includes oss_models.
@lilly-luo lilly-luo force-pushed the lilly/kimi-codex-agent branch from 1dc24f4 to 17b1b95 Compare July 2, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant