Skip to content

Add Astra model support and merge synced model catalogs - #124

Open
aesxu2345 wants to merge 7 commits into
RayBytes:mainfrom
aesxu2345:main
Open

aesxu2345 wants to merge 7 commits into
RayBytes:mainfrom
aesxu2345:main

Conversation

@aesxu2345

Copy link
Copy Markdown

Summary

  • Submit the seven existing commits from aesxu2345:main, including the latest README and macOS metadata ignore updates.
  • Add Astra model aliases and reasoning variants; omit the unverified gpt-6-astra-ultra ID from discovery without blocking explicit requests.
  • Merge remote and static model catalogs, deduplicate IDs, and prefer remote reasoning metadata for visible models.
  • Update the catalog client version to 0.153.4 and invalidate caches from other client versions.
  • Improve Chat Completions upstream error extraction; update README and Docker documentation and add route/catalog tests.

Behaviour changes and maintainer review

  • Astra reasoning variants are listed even when expose_reasoning_models is disabled. Other models remain opt-in. This is a default-behaviour change requiring maintainer agreement under CONTRIBUTING.md.
  • Static models are appended even when a remote catalog exists. This may list models unavailable to the account or reintroduce a static model hidden by the remote catalog; discovery does not guarantee upstream access.
  • The Chat Completions error path is changed. Review found that upstream2 or upstream can select the first response when the retry returns an HTTP error, because requests.Response is false for error statuses. The returned status can consequently correspond to the retry while the message corresponds to the first response. This remains unresolved in these commits.
  • Error extraction can return raw upstream response text; review its disclosure behaviour before merging.
  • README and DOCKER.md describe the Astra exception, but CLI help and the GUI checkbox do not yet explicitly describe it. Shared discovery logic applies to both OpenAI and Ollama routes.
  • No prior maintainer approval or issue discussion is claimed. No entry points or public parameter names were moved or renamed.

Validation performed

  • Python 3.11 isolated environment: python -m unittest discover -s tests — 27 tests passed.
  • Source distribution and wheel built successfully using PyPA build from outside the repository (the root build.py shadows that module).
  • git diff --check passed. Upstream main is an ancestor of this branch at submission time.
  • Checked root and nested ignore matches for .DS_Store, MAC_OSX/, and __MACOSX/. No such files were present to delete; no build artifacts or caches are included in the commits.
  • Live account model availability, real upstream requests, Jan/Raycast compatibility, and Docker/GUI runtime behaviour were not verified in this review.

How to try locally

  1. Install the project in a Python 3.11+ virtual environment and run python -m unittest discover -s tests.
  2. Start chatmock serve --no-model-sync and compare GET /v1/models with GET /api/tags: Astra low/medium/high/xhigh/max variants should appear without the general exposure flag, and Astra ultra should not appear.
  3. Repeat with --expose-reasoning-models to inspect variants for other models.
  4. After chatmock login, start with model sync enabled and inspect account-specific reasoning variants and the static fallback additions. Model availability must be checked against the signed-in account.
  5. Before merging, verify the catalogue visibility and failed tool-retry edge cases noted above with real-response-compatible test doubles.

Documentation and scope

README.md and DOCKER.md are updated. This PR deliberately includes the prior model/catalog/error-handling commits rather than presenting the latest documentation-only commit in isolation. Remaining CLI/GUI wording and compatibility concerns are disclosed above for maintainer review.

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.

1 participant