Commit Graph

10 Commits

Author SHA1 Message Date
can1357 d7241e572f fix(catalog): invalidate stale MAI Code routes 2026-07-16 03:31:58 +02:00
roboomp 4d89b29028 fix(catalog): routed copilot mai-code models to responses api
GitHub Copilot's mai-code-1-flash-picker (and other mai-* models) are
served only through the /responses endpoint; the classifier routed them
to /chat/completions, which returned 400 unsupported_api_for_model.

Added the mai- prefix to isCopilotResponsesModelId so both dynamic
discovery (inferCopilotApi) and bundled resolution
(COPILOT_API_RESOLUTION_RULES) select openai-responses, and updated the
bundled models.json entry to match.

Fixes #5612
2026-07-15 20:13:11 +00:00
roboomp e58d2c460c fix(providers): preserved copilot vision denials
Treat GitHub Copilot discovery input as authoritative during model merges so explicit supports.vision=false is not OR-upgraded from bundled references.

Fixes #4779
2026-07-10 12:20:39 +00:00
roboomp 4bae9a42ab fix(providers): required copilot vision confirmation
Keep non-personal Copilot endpoints text-only when discovery omits supports.vision, while preserving explicit vision support.

Fixes #4779
2026-07-10 12:08:43 +00:00
roboomp b0f22caf83 fix(providers): restored copilot business vision
Honor GitHub Copilot /models vision support on Business and Enterprise endpoints and remove the stale snapcompact non-personal-host block.

Fixes #4779
2026-07-10 11:57:14 +00:00
roboomp 714051d795 fix(catalog,coding-agent): disable vision on non-personal copilot endpoints
GitHub Copilot's /models response advertises supports.vision = true for
Claude/GPT chat models on every host, but only the canonical personal
endpoint (https://api.githubcopilot.com) actually accepts image inputs;
the business (api.business.githubcopilot.com) and enterprise
(copilot-api.{domain}) hosts respond '400 vision is not supported'.
snapcompact then injected rasterized transcript frames after compaction
and permanently broke every business-Copilot session.

- Catalog discovery (githubCopilotModelManagerOptions.mapModel) now
  forces input=['text'] whenever the resolved baseUrl is not the
  canonical personal-Copilot host, so the upstream's vision flag is
  honoured only where it actually works.
- mergeDynamicModel honours the dynamic input value (instead of
  OR-upgrading with the bundled reference) when the merged baseUrl
  differs from the bundled one, so a bundled spec pinned to the
  personal host can no longer taint a business-resolved merge.
- snapcompact-inline's canSendImages helper short-circuits the
  rasterizer for any github-copilot model whose baseUrl is non-personal,
  catching stale cached specs that still advertise vision.
- Helper isPersonalGitHubCopilotBaseUrl exported from
  pi-catalog/wire/github-copilot so catalog and coding-agent share one
  canonical check.

Regression coverage in github-copilot-model-limits.test.ts (vision
endpoint policy + full merge) and snapcompact-inline.test.ts (#3387
business/enterprise case).

Fixes #3387
2026-06-24 16:27:14 +00:00
roboomp 13b2b55221 fix(auth): routed copilot business endpoint
Stored GitHub Copilot plan-specific API endpoints discovered during OAuth login and propagated them through structured credentials, model discovery, usage/probe metadata, and request base URL resolution.

Added regression coverage for Business endpoint discovery, serialization, dynamic model discovery, and chat/responses routing.

Fixes #2876
2026-06-17 12:47:19 +00:00
can1357 c3e5b60174 feat(catalog): added requestModelId routing and Copilot long-context discovery support
- Added optional `requestModelId` to the `Model` interface for upstream wire overrides.
- Prioritized `model.requestModelId` when resolving request model IDs for Anthropic and OpenAI paths.
- Used `COPILOT_API_HEADERS` in Copilot discovery and policy calls with API version `2026-06-01`.
- Synthesized Copilot `-1m` long-context sibling models with dedicated upstream IDs and pricing data.
2026-06-11 21:28:32 +02:00
can1357 a25d521cab refactor(catalog): baked thinking metadata into buildModel pipeline
- Replaced minLevel/maxLevel range with explicit efforts array plus baked effortMap/supportsDisplay wire facts.
- Removed runtime enrichment layer and modelOmitsReasoningEffort; providers now read baked fields.
- Fixed dotted Opus 4.7/4.8 ids missing adaptive display via classifier-based predicates (#1373).
- Bumped model cache schema to v4 to invalidate pre-efforts rows.
2026-06-10 07:22:11 +02:00
can1357 1b9d9d0851 refactor(catalog)!: split model catalog from pi-ai
Move bundled models, model cache/manager, thinking metadata, effort helpers,
provider descriptors/discovery, wire constants, and model identity utilities
into the new @oh-my-pi/pi-catalog package.

Update pi-ai to keep provider runtime/auth concerns, move catalog provider
metadata into CATALOG_PROVIDERS, and migrate coding-agent, agent, stats, docs,
and tests to import catalog values from pi-catalog.

Split coding-agent model registry helpers into discovery, roles, and models
config modules while preserving registry orchestration.

BREAKING CHANGE: @oh-my-pi/pi-ai no longer exports catalog subpaths such as
/models, /model-cache, /model-manager, /model-thinking, /effort,
/provider-models*, discovery helpers, and provider wire constants; use the
matching @oh-my-pi/pi-catalog subpaths instead.
2026-06-10 04:06:57 +02:00