Do you need to use the thread local for this? Can't you pull the format option from the request option. And this should be specified as a format option rather than an additional top level kvp paramter.