Skip to content

fix: cli apikey bug fix#15

Merged
kocabiyik merged 1 commit into
withoutbg:mainfrom
Harsh-2005d:fix/api-key-bug
Mar 16, 2026
Merged

fix: cli apikey bug fix#15
kocabiyik merged 1 commit into
withoutbg:mainfrom
Harsh-2005d:fix/api-key-bug

Conversation

@Harsh-2005d

@Harsh-2005d Harsh-2005d commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Description

Fix CLI behavior where the WITHOUTBG_API_KEY environment variable forced the CLI to use the API even when the user explicitly selected the local model (--model opensource).

The API is now used only when explicitly requested (--use-api or --model api).
The environment variable is used only for authentication.

Type of Change

  • feat - New feature (MINOR version bump)
  • fix - Bug fix (PATCH version bump)
  • perf - Performance improvement (PATCH version bump)
  • refactor - Code refactoring (PATCH version bump)
  • docs - Documentation only (no version bump)
  • style - Code style/formatting (no version bump)
  • test - Adding or updating tests (no version bump)
  • chore - Maintenance/dependencies (no version bump)
  • ci - CI/CD changes (no version bump)

Breaking Changes

  • This PR includes breaking changes (MAJOR version bump)
  • If yes, please describe the breaking changes:

Checklist

  • My commit messages follow the Conventional Commits format
  • I have updated the documentation (if needed)
  • I have added tests (if needed)
  • All tests are passing locally
  • My code follows the project's style guidelines

Related Issues

Closes #10
Relates to #

Testing

Tested the CLI with different combinations:

  • WITHOUTBG_API_KEY=xxx withoutbg image.jpg --model opensource → uses local model
  • withoutbg image.jpg --model api --api-key xxx → uses API
  • withoutbg image.jpg → uses local model

This ensures the environment variable no longer forces API usage.

Screenshots (if applicable)


📝 Note: When this PR is merged to main, an automated release will be triggered based on your commit messages.

See AUTOMATED_RELEASES.md for details on how versioning works.

@kocabiyik
kocabiyik merged commit c0b4e4c into withoutbg:main Mar 16, 2026
4 of 28 checks passed
@kocabiyik

Copy link
Copy Markdown
Contributor

Thank you for the contribution @Harsh-2005d

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.

CLI tool ignoring 'model' parameter

2 participants