The TrustedRouter listings for Amazon Ergo and GLM 5.4 both show a 1,048,576-token context window. That gives you room for a large input. Whether the model retrieves the right passage and follows its exceptions is a separate, testable question. Output, instructions, message formatting and any tool definitions also need room within the applicable request limits. Amazon Ergo routes and prices · GLM 5.4 routes and prices
Build a test with an answer you know
Create a fictional operations manual with two dated refund policies. The January version says refunds take ten days. The October replacement says five business days for domestic orders and leaves international timing unspecified. Put the version date and section number on each passage. Ask for the domestic deadline, the international deadline and the source for each answer.
A passing answer cites the October section, returns five business days for domestic orders and says the international deadline is unspecified. An answer that confidently supplies ten days for international orders has combined incompatible versions. Move the October passage from the beginning to the middle and then to the end. Keep the question and expected answer fixed.
Decide how much context your application needs
Run the task with only the two relevant sections, then with the entire manual, then with the sections selected by your retrieval system. Record citation accuracy, unsupported answers, time to first token and billed input for each run. If the full manual fixes a retrieval miss, inspect the indexing or chunk boundaries. If the short input is equally accurate and much faster, use it as the baseline for the next release.
For production estimates, use the actual provider limit and token usage returned for your request. Reserve enough output for the citations you require. Local context budgeting · Worked API costs · Amazon Ergo vs GLM 5.4