Support for request-functions
I have a case where I, instead of setting gptel-api-key, would rather like to provide a function that performs requests for given data, request-method and some headers. I think this is more secure as this extension then does not need to know a secret. And it is more flexible, when you have some non-standard API-authentication-mechanisms.
Would that be possible to add something suitable?
I'm not sure what you're asking for. gptel-api-key can be set to a function that returns the key instead of the key. Similarly, the :key field for custom gptel backends can be set to a function. This is the recommended approach in the README.
To send a bespoke request with more control than gptel-send, check gptel-request and the wiki.