Optimistic Task Inference for Behavior Foundation Models