Skip to content

feat: add /login command and auto-select Altimate model#131

Closed
suryaiyer95 wants to merge 2 commits intomainfrom
feat/login-auto-model
Closed

feat: add /login command and auto-select Altimate model#131
suryaiyer95 wants to merge 2 commits intomainfrom
feat/login-auto-model

Conversation

@suryaiyer95
Copy link
Copy Markdown
Contributor

@suryaiyer95 suryaiyer95 commented Mar 13, 2026

Summary

Add /login slash command for Altimate credential setup and register Altimate as a provider option alongside Anthropic, OpenAI, and others. Once credentials are configured, "Altimate AI" appears in the provider list and is selected as the default.

Closes #112

Changes

  • /login slash command (dialog-altimate-login.tsx): 3-step TUI wizard prompts for backend URL, tenant name, and API key, then writes credentials to ~/.altimate/altimate.json with 0o600 permissions
  • Default provider selection (local.tsx): When Altimate credentials are configured, prefer "Altimate AI" as the default provider — no manual picker interaction needed
  • Provider registration (provider.ts): Register altimate-backend as an OpenAI-compatible provider with a single "Altimate AI" model entry, loaded automatically when credentials exist
  • Dynamic base URL (provider.ts): Use creds.altimateUrl from the credential file instead of hardcoded localhost:8000

Behavior

Scenario Before After
No credentials Provider picker (Anthropic, OpenAI, etc.) Same (unchanged)
After /login Manual provider selection Defaults to "Altimate AI"
Existing credentials on launch Manual provider selection Defaults to "Altimate AI"

Test Plan

  • Run /login → complete all 3 steps → verify ~/.altimate/altimate.json is written with correct altimateUrl, altimateInstanceName, altimateApiKey
  • After login, "Altimate AI" appears as a provider and is selected by default
  • Fresh launch with existing credentials → defaults to Altimate AI
  • Without credentials → existing provider selection flow unchanged, Altimate AI not shown
  • Cancel midway through /login wizard → no partial credential file written
  • Verify credential file has restrictive permissions (0o600)

Checklist

  • Tests added/updated
  • Documentation updated (if needed)
  • CHANGELOG updated (if user-facing)

suryaiyer95 and others added 2 commits March 11, 2026 15:33
- Add `/login` slash command with 3-step wizard (URL, tenant, API key)
  that writes credentials to `~/.altimate/altimate.json`
- Auto-select `altimate-backend/altimate-default` model when credentials
  are configured — no provider or model selection needed
- Replace 3 separate Claude model entries with single "Altimate AI" model
  (backend handles model routing via litellm fallback chain)
- Fix hardcoded `localhost:8000` URL to use `creds.altimateUrl` from
  credential file

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@github-actions
Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot closed this Mar 14, 2026
@anandgupta42 anandgupta42 deleted the feat/login-auto-model branch March 17, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: /login command and auto-model selection for Altimate backend

1 participant