API vs Playground: different behavior

We created new retrieval assistant and instructed to reply in accordance with data in attached file or based on AI training if question related to the business topic. If question is not related to the business topic, reply with pre-declared text: ‘we can’t answer this question’.
When tested with Playground, everything works as expected.
When checked with Python script/API calls, business related question replied the same way like in Playground. Unrelated to business question replayed with blank content message, not with ‘we can’t answer this question’ as expected (and replied in Playground.
Can I consider it is bug?