Skip to content

feat(pi): add validated GLM/Kimi MLflow provider#217

Open
dgokeeffe wants to merge 1 commit into
databricks:mainfrom
dgokeeffe:feat/pi-oss-provider-v2
Open

feat(pi): add validated GLM/Kimi MLflow provider#217
dgokeeffe wants to merge 1 commit into
databricks:mainfrom
dgokeeffe:feat/pi-oss-provider-v2

Conversation

@dgokeeffe

@dgokeeffe dgokeeffe commented Jul 16, 2026

Copy link
Copy Markdown

Summary

Adds Pi support for the validated OSS coding-model cohort already used by ucode: GLM and Kimi.

Closes #204. Supersedes the earlier broad-cohort/proxy approach in this PR.

Changes

  • Add Pi's databricks-mlflow provider (openai-completions/ai-gateway/mlflow/v1).
  • Configure the gateway compatibility flags Pi needs: supportsStore: false and supportsStrictMode: false.
  • Share GLM/Kimi context, output, and reasoning metadata across Pi and OpenCode.
  • Let Pi select discovered OSS models and use them as the final default fallback.
  • Keep OSS discovery as an explicit product allowlist: GLM and Kimi only.
  • Keep the independent gpt-oss exclusion from the Codex/Responses bucket so it cannot be routed to an incompatible API.
  • Include Pi in OSS discovery diagnostics.

Review follow-up

Validation

  • uv run pytest tests/test_agent_pi.py tests/test_agent_opencode.py tests/test_databricks.py tests/test_cli.py -q
  • uv run ruff check on all changed Python files
  • Final review-loop validation: 588 passed, 29 skipped across the focused changed-area suite.
  • The full stacked branch passes 1062 passed, 36 skipped when installed-agent capture tests are excluded. Those tests depend on locally installed agent state rather than the unit under review.

Scope

This is the base of the stack:

  1. feat(pi): add validated GLM/Kimi MLflow provider #217 — Pi GLM/Kimi provider and shared OSS metadata
  2. fix: declare long-context Claude and GPT metadata #223 — Claude/GPT long-context metadata
  3. fix(opencode): add GPT routing alongside OSS discovery #239 — OpenCode GPT routing and serving-endpoint fallback

@dgokeeffe

Copy link
Copy Markdown
Author

@rohita5l @AarushiShah-db — would appreciate a review when you have a moment. This builds directly on your OSS work (#178 Kimi, #186 GLM): adds a Pi databricks-mlflow provider (Pi had none), broadens the OSS family bucket to the rest of the chat-completions cohort (inkling/llama/qwen/gpt-oss/gemma, excluding embeddings), corrects the GLM limits to the probed gateway caps (1M context / 65536 output), and adds a reasoning flag. One heads-up: it reverses the GLM output cap from #186's 25k to a verified 65536 — details in the PR description. A code-review pass was already applied (proxy framing/error-handling/SSRF-guard hardening). CI hasn't run — could use a maintainer approve-and-run on this fork PR.

Comment thread src/ucode/agents/_mlflow_proxy.py Outdated
Comment thread src/ucode/databricks.py Outdated
@dgokeeffe
dgokeeffe force-pushed the feat/pi-oss-provider-v2 branch from c99f3b4 to 5a46e7a Compare July 26, 2026 00:38
@dgokeeffe dgokeeffe changed the title feat(pi): OSS mlflow provider + broaden OSS cohort (reasoning, limits) feat(pi): add validated GLM/Kimi MLflow provider Jul 26, 2026
@dgokeeffe

Copy link
Copy Markdown
Author

@rohita5l I refreshed this PR around the review feedback: removed the local proxy, deferred Inkling pending #215, narrowed OSS selection to GLM/Kimi, removed version/lockfile noise, and resolved both threads with details. The branch is rebased on current main and locally validated. Could you re-review and approve the fork CI run when convenient?

Expose the GLM and Kimi coding-model cohort through Pi and OpenCode with shared token limits and reasoning metadata. Keep unsupported chat models out of discovery, including Inkling until gateway issue databricks#215 is fixed, and retain the GPT-OSS Responses API routing guard.
@dgokeeffe
dgokeeffe force-pushed the feat/pi-oss-provider-v2 branch from 5a46e7a to 65b4609 Compare July 26, 2026 04:38
@dgokeeffe

Copy link
Copy Markdown
Author

Post-review update: a 3-round fresh-context review loop found and fixed two additional foundation issues in this layer: GLM 5.2 now has model-specific 1M/65536 limits while older/unknown GLM keeps 200k/25k, and Pi OSS-only workspaces now pass shared availability/diagnostic checks. Focused and full-stack validation are updated in the PR body.

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.

ucode pi automatic model detection

2 participants