Address code review feedback from PR #1969:
1. Improve URL matching precision:
- Use urlparse for robust hostname validation
- Prevent false positives with URL substring matching
- Add support for gitlab.com/gitlab.io subdomains
2. Add authentication type validation:
- Validate explicit GITLAB.AUTH_TYPE configuration
- Provide clear error messages for invalid auth types
- Prevent silent failures from user configuration errors
This enhances code reliability and user experience while maintaining
backward compatibility.
- Add intelligent authentication method detection based on GitLab URL
- Support explicit configuration override via GITLAB.AUTH_TYPE
- Maintain backward compatibility with existing oauth_token usage
- Fix 401 Unauthorized errors for private GitLab deployments
Fixes authentication issues where private GitLab instances require
private_token instead of oauth_token for API access.
* - Add support for documentation content exceeding token limits via two phase operation:
1. Ask LLM to rank headings which are most likely to contain an answer to a user question
2. Provide the corresponding files for the LLM to search for an answer.
- Refactor of help_docs to make the code more readable
- For the purpose of getting canonical path: git providers to use default branch and not the PR's source branch.
- Refactor of token counting and making it clear on when an estimate factor will be used.
* Code review changes:
1. Correctly handle exception during retry_with_fallback_models (to allow fallback model to run in case of failure)
2. Better naming for default_branch in bitbucket cloud provider
Support forcing accurate token calculation (claude)
Help docs: Add desired branch in case of user supplied git repo, with default set to "main"
Better documentation for getting canonical url parts