Skip to content

Comments

feat: add backend version update checking#84

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/check-version-update-code
Closed

feat: add backend version update checking#84
Copilot wants to merge 1 commit intomainfrom
copilot/check-version-update-code

Conversation

Copy link

Copilot AI commented Feb 22, 2026

Implements backend logic to check for new releases and expose the result via a REST endpoint, enabling the UI to surface update notifications.

Changes

src/utils/VersionChecker.js (new utility class)

  • getCurrentVersion() — reads from VERSION env var (Docker build-time injection) or package.json
  • fetchTags() — queries GitHub Tags API, filters to v* tags (excludes previews), sorts descending
  • checkDockerImageExists(tag) — probes GHCR manifest endpoint with OAuth token flow to confirm image availability
  • checkForUpdates() — returns { current, latest, hasUpdate, releaseUrl }, only surfaces a newer version if its Docker image is already published

src/routes/StatusRoutes.js

  • Adds GET /api/version/check (auth-required)
  • Respects CHECK_UPDATE=false env var; returns { disabled: true } without hitting GitHub

Configuration

  • .env.example documents CHECK_UPDATE=true
  • README.md / README_EN.md updated with env variable table entry

UI integration (ui/app/pages/StatusPage.vue)

  • Calls /api/version/check on page load; renders update badge with release link when hasUpdate is true
// Example response when update is available
{
  current: "0.7.0",
  latest: "v0.7.1",
  hasUpdate: true,
  releaseUrl: "https://github.com/iBUHub/AIStudioToAPI/releases/tag/v0.7.1"
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add backend version update check functionality feat: add backend version update checking Feb 22, 2026
Copilot AI requested a review from bbbugg February 22, 2026 09:14
@bbbugg bbbugg closed this Feb 22, 2026
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.

2 participants