I get a lot of tool calling errors on gpt models. Qwen and Kimi work fine….
'message': 'BadRequestError: litellm.BadRequestError: Error code: 400 - {\'error\': {\'message\': \'litellm.BadRequestError: GroqException - {"error":{"message":"Failed to parse tool call arguments as JSON","type":"invalid_request_error","code":"tool_use_failed","failed_generation":"import csv\\\\nmax_country=None\\\\nmax_val=-1\\\\nwith open(\\\'/workspace/project/wip/06895f81-cdd6-72fa-8000-1ca84933bf86/06895f82-51d8-7ce5-8000-f10f12198cc8/df.csv\\\', newline=\\\'\\\') as f:\\\\n reader=csv.DictReader(f)\\\\n for row in reader:\\\\n try:\\\\n val=float(row[\\\'6\\\'])\\\\n except Exception as e:\\\\n continue\\\\n if val\\\\u003emax_val:\\\\n max_val=val\\\\n max_country=row[\\\'0\\\']\\\\nprint(max_country, max_val)\\\\n\\\\n"}}\\n. Received Model Group=coding\\nAvailable Model Group Fallbacks=None\', \'type\': None, \'param\': None, \'code\': \'400\'}}'
,