Claudia Pellegrino
7ae0fa3775
chore: remove redundant code
...
1. The module already imports `requests`, so by the time this check is
called, the module is already loaded.
2. Even if the code path were taken, it would fail anyway, because the
`aider[oauth]` extra was hallucinated and does not exist.
3. Downstream distributions usually have managed Python environments,
where pip cannot be used at all.
That means distros must patch out every such pip invocation
(example: [1]; full disclosure: I maintain this but other distros
will eventually bump into the same issues). Restricting at-runtime
pip usage to the minimum necessary is friendlier to distro
maintainers.
[1]: https://aur.archlinux.org/cgit/aur.git/tree/archlinux-use-system.patch?h=aider-chat&id=7f8156946857215104bce151454ad0101ade4a48
2025-03-31 19:13:41 +02:00
Paul Gauthier (aider)
83dac4aae2
style: Improve formatting of OpenRouter key exchange error message
2025-03-31 09:17:32 +13:00
Paul Gauthier (aider)
75b79fa002
fix: Correct HTTPError status code access in onboarding
2025-03-31 09:17:26 +13:00
Paul Gauthier
c3c960383e
feat: Offer OpenRouter OAuth if no model detected
2025-03-28 18:51:35 -10:00
Paul Gauthier
9e3adf0bf8
fix: Temporarily disable OpenRouter OAuth onboarding flow
2025-03-28 18:46:39 -10:00
Paul Gauthier
2bc0aa1777
docs: Fix docstring for check_openrouter_tier failure case
2025-03-28 18:45:31 -10:00
Paul Gauthier (aider)
3bc4064b61
fix: Default to free tier if OpenRouter tier check fails
2025-03-28 18:44:57 -10:00
Paul Gauthier (aider)
b4f9258f3c
fix: Remove unused exception variable in webbrowser.open call
2025-03-28 18:29:26 -10:00
Paul Gauthier (aider)
ad844cce5c
style: Fix linting issues in onboarding.py
2025-03-28 18:29:14 -10:00
Paul Gauthier (aider)
c73b064133
feat: Add OpenRouter tier-based model selection logic
2025-03-28 18:29:08 -10:00
Paul Gauthier
bd9b63a1aa
refactor: Simplify OpenRouter OAuth flow messages and error handling
2025-03-28 18:29:05 -10:00
Paul Gauthier (aider)
2d87431aeb
style: Apply linter formatting to onboarding.py
2025-03-28 18:03:10 -10:00
Paul Gauthier (aider)
3f3b1fb657
refactor: Update OpenRouter OAuth flow timeout to 5 minutes
2025-03-28 18:03:05 -10:00
Paul Gauthier
477f9eb4ec
refactor: Update OpenRouter onboarding messages and flow
2025-03-28 18:03:04 -10:00
Paul Gauthier (aider)
91497dc2ee
feat: Append OpenRouter API key to oauth-keys.env instead of overwriting
2025-03-28 17:57:26 -10:00
Paul Gauthier
928b78d9f6
feat: Simplify default model selection and improve OpenRouter OAuth key saving
2025-03-28 17:57:24 -10:00
Paul Gauthier (aider)
51825663b9
refactor: Extract model selection and OAuth logic into separate functions
2025-03-28 17:53:15 -10:00
Paul Gauthier
01fdbda728
refactor: Restructure model selection logic with new helper functions
2025-03-28 17:53:13 -10:00
Paul Gauthier
fa3c68fccd
fix: Use print for auth URL and refine missing key message
2025-03-28 17:46:12 -10:00
Paul Gauthier (aider)
189977e4c7
fix: Update OpenRouter OAuth callback URL path to /callback/aider
2025-03-28 17:35:26 -10:00
Paul Gauthier (aider)
15cec5bd50
feat: Save OpenRouter API key to ~/.aider/oauth-keys.env
2025-03-28 17:32:39 -10:00
Paul Gauthier (aider)
f53db636e1
style: Format comments
2025-03-28 17:28:00 -10:00
Paul Gauthier (aider)
47d3802ffe
feat: Handle user interruption during OpenRouter OAuth flow
2025-03-28 17:27:54 -10:00
Paul Gauthier (aider)
e98ffb5ae0
fix: Fix OAuth server premature shutdown on callback
2025-03-28 17:25:02 -10:00
Paul Gauthier (aider)
5d77eb1314
feat: Redirect callback URL to website if code param is missing
2025-03-28 17:23:21 -10:00
Paul Gauthier
f124cdbb6f
refactor: Remove stream argument from Coder in onboarding
2025-03-28 17:21:04 -10:00
Paul Gauthier (aider)
1649d084d2
fix: Remove unused sys import
2025-03-28 17:16:28 -10:00
Paul Gauthier (aider)
36ca790c3d
style: Sort imports alphabetically
2025-03-28 17:16:09 -10:00
Paul Gauthier (aider)
a91a8216b7
test: Add main function to test OpenRouter OAuth flow
2025-03-28 17:16:03 -10:00
Paul Gauthier (aider)
8cae7b20e7
fix: Remove unused variable found_key_env_var
2025-03-28 17:14:40 -10:00
Paul Gauthier (aider)
a537119f3d
fix: Address flake8 linting errors in onboarding
2025-03-28 17:14:15 -10:00
Paul Gauthier (aider)
15fe0afe62
style: Run linter on onboarding module
2025-03-28 17:13:48 -10:00
Paul Gauthier (aider)
1b2a4db1ed
feat: Add OpenRouter OAuth PKCE flow for authentication
2025-03-28 17:13:42 -10:00
Paul Gauthier (aider)
88a02723fa
refactor: Extract default model selection logic to onboarding module
2025-03-28 16:54:10 -10:00