Refactor to use auth_credential for consistent credential management and
improve error handling with defensive checks.
Changes:
- Use auth_credential instead of api_key for better credential handling
- Simplify model availability check to accept all pre-registered models
- Guard metrics collection when usage data is missing in responses
- Add debug logging for better troubleshooting of API issues
- Update unit tests for auth_credential refactoring