RedInk icon indicating copy to clipboard operation
RedInk copied to clipboard

函数使用错误导致的bug

Open bebestmaple opened this issue 10 months ago • 1 comments

例如:

base_url = config['base_url'].rstrip('/').rstrip('/v1') if config.get('base_url') else 'https://api.openai.com'

使用了 .rstrip('/v1') 导致错误的删除了baseurl中的字符,需注意 rstrip 的作用。

bebestmaple avatar Jan 06 '26 04:01 bebestmaple

Fixed in commit 2e69c50: replaced all 5 incorrect rstrip('/v1') calls with proper endswith('/v1') suffix removal to prevent URL truncation.

HisMax avatar Mar 15 '26 10:03 HisMax