feat(github-copilot): resolve any model ID dynamically#51325
Conversation
Greptile SummaryThis PR refactors the GitHub Copilot extension's Key changes:
Confidence Score: 5/5
Last reviewed commit: "fix(github-copilot):..." |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74d09d4d55
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 994648b9f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@greptileai another review please |
|
@greptileai another review please |
|
@greptileai another review please |
…nts, add mid-string test
…planatory comment
8229a32 to
fef3a8c
Compare
|
Landed on main. Thanks @fuller-stack-dev. |
There was a problem hiding this comment.
💡 Codex Review
openclaw/extensions/github-copilot/index.ts
Lines 136 to 139 in fef3a8c
Returning an empty Copilot catalog here means the new runtime-only fallback never feeds loadModelCatalog(). In the common path this PR advertises—adding github-copilot/<new-id> under agents.defaults.models—buildAllowedModelSet() can only synthesize a bare {id,name,provider} entry, so resolveDefaultThinkingLevel() / resolveDefaultReasoningLevel() still treat models like github-copilot/gpt-5.4-mini as non-reasoning and default them to off. OpenAI/OpenAI-Codex pair their forward-compat resolver with catalog augmentation for exactly this reason; without the same step here, the “no code change required” flow ships incomplete behavior for every new Copilot model ID.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
* feat(github-copilot): resolve any model ID dynamically instead of only known ones * refactor(github-copilot): extract model resolution, add reasoning heuristic and tests * fix(github-copilot): default synthetic models to text-only input * ci: retrigger checks * copilot: mark synthetic catch-all models as vision-capable * fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test * fix(github-copilot): default synthetic models to text-only input * fix(github-copilot): restore image input for synthetic models with explanatory comment * fix(github-copilot): normalize registry lookup casing, add bare o3 test case * fix: preserve configured overrides for dynamic models * fix: allow dynamic GitHub Copilot models (openclaw#51325) (thanks @fuller-stack-dev) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* feat(github-copilot): resolve any model ID dynamically instead of only known ones * refactor(github-copilot): extract model resolution, add reasoning heuristic and tests * fix(github-copilot): default synthetic models to text-only input * ci: retrigger checks * copilot: mark synthetic catch-all models as vision-capable * fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test * fix(github-copilot): default synthetic models to text-only input * fix(github-copilot): restore image input for synthetic models with explanatory comment * fix(github-copilot): normalize registry lookup casing, add bare o3 test case * fix: preserve configured overrides for dynamic models * fix: allow dynamic GitHub Copilot models (openclaw#51325) (thanks @fuller-stack-dev) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* feat(github-copilot): resolve any model ID dynamically instead of only known ones * refactor(github-copilot): extract model resolution, add reasoning heuristic and tests * fix(github-copilot): default synthetic models to text-only input * ci: retrigger checks * copilot: mark synthetic catch-all models as vision-capable * fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test * fix(github-copilot): default synthetic models to text-only input * fix(github-copilot): restore image input for synthetic models with explanatory comment * fix(github-copilot): normalize registry lookup casing, add bare o3 test case * fix: preserve configured overrides for dynamic models * fix: allow dynamic GitHub Copilot models (openclaw#51325) (thanks @fuller-stack-dev) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* feat(github-copilot): resolve any model ID dynamically instead of only known ones * refactor(github-copilot): extract model resolution, add reasoning heuristic and tests * fix(github-copilot): default synthetic models to text-only input * ci: retrigger checks * copilot: mark synthetic catch-all models as vision-capable * fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test * fix(github-copilot): default synthetic models to text-only input * fix(github-copilot): restore image input for synthetic models with explanatory comment * fix(github-copilot): normalize registry lookup casing, add bare o3 test case * fix: preserve configured overrides for dynamic models * fix: allow dynamic GitHub Copilot models (openclaw#51325) (thanks @fuller-stack-dev) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* feat(github-copilot): resolve any model ID dynamically instead of only known ones * refactor(github-copilot): extract model resolution, add reasoning heuristic and tests * fix(github-copilot): default synthetic models to text-only input * ci: retrigger checks * copilot: mark synthetic catch-all models as vision-capable * fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test * fix(github-copilot): default synthetic models to text-only input * fix(github-copilot): restore image input for synthetic models with explanatory comment * fix(github-copilot): normalize registry lookup casing, add bare o3 test case * fix: preserve configured overrides for dynamic models * fix: allow dynamic GitHub Copilot models (openclaw#51325) (thanks @fuller-stack-dev) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* feat(github-copilot): resolve any model ID dynamically instead of only known ones * refactor(github-copilot): extract model resolution, add reasoning heuristic and tests * fix(github-copilot): default synthetic models to text-only input * ci: retrigger checks * copilot: mark synthetic catch-all models as vision-capable * fix(github-copilot): anchor reasoning regex, unexport internal constants, add mid-string test * fix(github-copilot): default synthetic models to text-only input * fix(github-copilot): restore image input for synthetic models with explanatory comment * fix(github-copilot): normalize registry lookup casing, add bare o3 test case * fix: preserve configured overrides for dynamic models * fix: allow dynamic GitHub Copilot models (openclaw#51325) (thanks @fuller-stack-dev) --------- Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Summary
resolveDynamicModelhandler a catch-all: any model ID not already in the Pi SDK registry gets a synthetic definition created automaticallygpt-5.4-mini,claude-opus-4.6-fast) can now be used by adding them toagents.defaults.modelsin config — no code change or release requiredgpt-5.3-codex→gpt-5.2-codextemplate cloning for backward compat (falls through to synthetic catch-all if template is missing)reasoning: truefor o1/o3 model IDs via heuristic, matching the existingsupportsXHighThinkingpatternMotivation
Currently, every time GitHub adds a new model to Copilot, users hit
Unknown model: github-copilot/<new-model>until a code change adds it to the registry or a forward-compat resolver. This is unnecessary friction — the extension should accept any model ID and let the API validate availability.Test plan
models.test.tsgithub-copilot/gpt-5.4-miniresolves without "Unknown model" errorclaude-sonnet-4.6,gpt-4o) still resolve via the registry pathgpt-5.3-codexstill uses the template cloning path