Skip to content

Add remote provider model discovery fallbacks#1059

Draft
mimeding wants to merge 9 commits into
osaurus-ai:mainfrom
mimeding:codex/provider-compat-828-615-draft
Draft

Add remote provider model discovery fallbacks#1059
mimeding wants to merge 9 commits into
osaurus-ai:mainfrom
mimeding:codex/provider-compat-828-615-draft

Conversation

@mimeding
Copy link
Copy Markdown
Contributor

Summary

Draft stacked on #1048. This branch includes #1048 as its local base so the provider work can be built and tested today; do not mark ready or merge until #1048 lands, then rebase/retarget this branch onto main so the PR diff collapses to the provider changes only.

Business rationale

MiniMax and Lemonade are high-value remote provider paths for users who want cheaper hosted inference or local OpenAI-compatible servers. MiniMax does not expose /models, so requiring discovery blocks users even when they know the exact model ID. Lemonade returns useful OpenAI-compatible model lists, but its payload includes provider-specific metadata such as fractional size, which should not prevent Osaurus from connecting.

Coding rationale

  • Keep normal /models discovery as the preferred path.
  • Allow manual model IDs to carry OpenAI-compatible providers only when model discovery fails like a missing endpoint, while still surfacing auth failures such as HTTP 401.
  • Preserve Azure deployment behavior and make the fallback capability explicit on RemoteProviderType.
  • Decode Lemonade-style model payloads defensively by ignoring non-integer size metadata instead of failing the whole response.
  • Expose manual model IDs in the custom-provider add flow and save them so MiniMax can connect directly.

Validation

  • git diff --check 71fd60df657294c84b8ef9cb800f3f8cd5a2c2dd..HEAD
  • swiftlint lint --strict --config .swiftlint.yml --force-exclude Packages/OsaurusCore/Managers/RemoteProviderManager.swift Packages/OsaurusCore/Models/API/OpenAIAPI.swift Packages/OsaurusCore/Models/Configuration/RemoteProviderConfiguration.swift Packages/OsaurusCore/Views/Settings/RemoteProviderEditSheet.swift Packages/OsaurusCore/Tests/Provider/RemoteChatRequestEncodingTests.swift Packages/OsaurusCore/Tests/Provider/RemoteProviderManagerRefreshTests.swift
  • swift test --package-path Packages/OsaurusCore --filter RemoteChatRequestEncodingTests
  • swift test --package-path Packages/OsaurusCore --filter RemoteProviderManagerRefreshTests

Fixes #828.
Fixes #615.

Michael Meding added 9 commits May 10, 2026 00:04
Adds scripts/codex local CI and worktree helpers for Phase A0 orchestration.

Applies SwiftLint cleanup needed for strict lint on origin/main 30c6522, with scoped disables for legacy policy rules.

Fixes SandboxInstallLockTests to assert same-agent serialization without relying on async scheduling order.

Local verification: scripts/codex/local-ci.sh PASS (attempt 3, 2026-05-07T15:20:18Z).
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.

Minimax 2.7 Not Connecting trying to connect to local lemonade / OpenAI compat server

1 participant