I don't have a ton of experience with Postgres routines but the error seems to indicate that the therapist_id is being interpreted as a string instead of an integer. I'd try explicitly type casting it as SELECT update_therapist_availability ({{ therapist_id }}::int, ...;.
Is there a reason that you're using a routine instead of an INSERT or UPDATE query? Retool provides a convenient GUI interface for writing those kind of queries, in particular.