Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Codex catalog generation falls back to `default_reasoning_level=none` for Unity Catalog GPT‑6 model services

Open Beginner friendly
#1,042 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by reading src/ucode/agents/codex_catalog.py, especially codex_model_id() and build_codex_catalog(), then inspect the existing tests for Codex catalog/model ID handling. Reproduce with a Unity Catalog service name such as mlops_ont.models.codegen-gpt-6-luna and compare its generated entry with codex debug models --bundled. Done means the service name resolves to the bundled GPT-6 metadata, including native reasoning defaults and supported levels, rather than _HOSTED_DEFAULTS.

Written by the indexing model from the issue text.

Description

When using Codex through Unity Gateway with Unity Catalog model service names such as:

mlops_ont.models.codegen-gpt-6-luna

Unity Gateway generates ~/.ucode/codex-model-catalog.json entries with:

{
  "default_reasoning_level": "none",
  "supported_reasoning_levels": [
    {
      "effort": "none",
      "description": "Default model behavior"
    }
  ]
}

This appears to happen because the UC model service name is not mapped to the corresponding bundled Codex model (gpt-6-luna, gpt-6.1-sol, etc.), causing catalog generation to fall back to _HOSTED_DEFAULTS.

As a result, GPT‑6.x models receive generic metadata instead of their native Codex metadata.

Environment

Unity Gateway current main branch.

Codex CLI contains bundled GPT‑6 models:

codex debug models --bundled > /tmp/models.json
jq -r '.models[].slug' /tmp/models.json | grep gpt-6

Output:

gpt-6-astra
gpt-6.1-sol
gpt-6-sol
gpt-6-luna

Reproduction

Configure a Codex model service using a Unity Catalog endpoint name similar to:

mlops_ont.models.codegen-gpt-6-luna

Start Codex through Unity Gateway:

ug codex

Inspect the generated model catalog:

cat ~/.ucode/codex-model-catalog.json

Actual Result

Generated catalog entry contains:

{
  "slug": "mlops_ont.models.codegen-gpt-6-luna",
  "default_reasoning_level": "none",
  "supported_reasoning_levels": [
    {
      "effort": "none"
    }
  ]
}

The metadata comes from the fallback defaults in:

_HOSTED_DEFAULTS = {
    "default_reasoning_level": "none",
    "supported_reasoning_levels": [
        {
            "effort": "none",
            "description": "Default model behavior"
        }
    ]
}

located in:

src/ucode/agents/codex_catalog.py

Expected Result

Unity Gateway should map:

mlops_ont.models.codegen-gpt-6-luna

to:

gpt-6-luna

and reuse the bundled Codex GPT‑6 metadata instead of generating fallback metadata.

The generated catalog should inherit the native GPT‑6 reasoning capabilities and defaults from:

codex debug models --bundled

Root Cause Analysis

build_codex_catalog() attempts to locate a native bundled model:

native = by_slug.get(name) or by_key.get(_model_key(name))

However _model_key() depends on:

codex_model_id()

Current implementation only recognizes:

system.ai.*
databricks-*

Example:

if model.startswith("system.ai."):
    bare = model.removeprefix("system.ai.")
elif tail.startswith("databricks-"):
    bare = tail.removeprefix("databricks-")
else:
    return model

For a Unity Catalog service such as:

mlops_ont.models.codegen-gpt-6-luna

the function returns the original string unchanged.

As a result:

native is None

and catalog generation falls back to:

_HOSTED_DEFAULTS

which sets:

"default_reasoning_level": "none"

and

"supported_reasoning_levels": [
  {
    "effort": "none"
  }
]

Suggested Fix

Enhance codex_model_id() to recognize GPT-family models embedded within Unity Catalog model service names.

Example:

mlops_ont.models.codegen-gpt-6-luna
                         ↓
                     gpt-6-luna

so that:

by_key.get(_model_key(name))

resolves to the bundled Codex GPT‑6 metadata.

This would allow GPT‑6.x models to inherit native reasoning defaults and supported reasoning levels instead of the generic hosted fallback metadata.

Impact

This is largely invisible for some GPT‑5 endpoints because they can tolerate the fallback metadata.

GPT‑6.x reasoning models, however, appear to require proper reasoning metadata and therefore expose the issue through failed or invalid reasoning configuration.

Dominant language
Python
Stars
111
Forks
92
Avg merge
1d 17h
Merged PRs (30d)
231

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/unity-gateway

All issues in databricks/unity-gateway

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.