refactor(api): move Codex client model handling to registry package

- Relocated Codex client model JSON and related logic from `openai` package to `registry` for better modularity.
- Updated references to use `registry.GetCodexClientModelsJSON()` in loading logic.
- Extended test cases to cover additional field removals (`upgrade`, `availability_nux`).
This commit is contained in:
Luis Pater
2026-05-17 05:11:41 +08:00
parent ddd10539ad
commit 96754f5a33
5 changed files with 20 additions and 5 deletions
@@ -8,7 +8,6 @@ package openai
import (
"context"
_ "embed"
"encoding/json"
"fmt"
"net/http"
@@ -30,9 +29,6 @@ type OpenAIAPIHandler struct {
*handlers.BaseAPIHandler
}
//go:embed codex_client_models.json
var codexClientModelsJSON []byte
// NewOpenAIAPIHandler creates a new OpenAI API handlers instance.
// It takes an BaseAPIHandler instance as input and returns an OpenAIAPIHandler.
//