# Unexpected token

**URL:** <https://community.pickaxe.co/t/unexpected-token/2885>\
**Category:** Bugs / Site Issues\
**Created:** [December 12, 2024, 12:11am UTC](https://community.pickaxe.co/t/unexpected-token/2885 "2024-12-12T00:11:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![equipeid](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@equipeid](https://community.pickaxe.co/u/equipeid)\
**Post date:** [December 12, 2024, 12:11am UTC](https://community.pickaxe.co/t/unexpected-token/2885/1 "2024-12-12T00:11:27Z")

</div>

Hi admins,

Some users are relating the “unexpected token” problem when they try to use the pickaxe.

Please help me fix.

Thanks!

---

<div class="post-metadata">

**Author:** ![admin\_mike](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.pickaxe.co/admin_mike/32/283_2.png) [@admin\_mike](https://community.pickaxe.co/u/admin_mike)\
**Post date:** [December 12, 2024, 7:57pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/2 "2024-12-12T19:57:36Z")

</div>

This may have been related to OpenAI going down yesterday. Please let me know if it continues to occur.

---

<div class="post-metadata">

**Author:** ![equipeid](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@equipeid](https://community.pickaxe.co/u/equipeid)\
**Post date:** [January 7, 2025, 2:17pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/3 "2025-01-07T14:17:03Z")

</div>

Hi Mike,

We still have users overtime that are complaining about this issue.

Could you please help me? Thanks 🙂

---

<div class="post-metadata">

**Author:** ![admin\_mike](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.pickaxe.co/admin_mike/32/283_2.png) [@admin\_mike](https://community.pickaxe.co/u/admin_mike)\
**Post date:** [January 7, 2025, 10:56pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/4 "2025-01-07T22:56:45Z")

</div>

can you send me a link to the too? I will look into it.

---

<div class="post-metadata">

**Author:** ![equipeid](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@equipeid](https://community.pickaxe.co/u/equipeid)\
**Post date:** [January 7, 2025, 11:07pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/5 "2025-01-07T23:07:56Z")

</div>

Yes. Here it is: [https://beta.pickaxeproject.com/axe?id=PhD\_Level\_Scientific\_Writing\_Assistant\_YO12C](https://beta.pickaxeproject.com/axe?id=PhD_Level_Scientific_Writing_Assistant_YO12C)

---

<div class="post-metadata">

**Author:** ![equipeid](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@equipeid](https://community.pickaxe.co/u/equipeid)\
**Post date:** [January 8, 2025, 7:09pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/6 "2025-01-08T19:09:50Z")

</div>

> [@equipeid](#):
>
> [https://beta.pickaxeproject.com/axe?id=PhD\_Level\_Scientific\_Writing\_Assistant\_YO12C](https://beta.pickaxeproject.com/axe?id=PhD_Level_Scientific_Writing_Assistant_YO12C)

Mike, did you have the chance to fix it?

Other users are complaining the same.

Here we have a pickaxe example: [https://beta.pickaxeproject.com/axe?id=PhD\_Level\_Scientific\_Writing\_Assistant\_YO12C](https://beta.pickaxeproject.com/axe?id=PhD_Level_Scientific_Writing_Assistant_YO12C)

---

<div class="post-metadata">

**Author:** ![admin\_mike](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.pickaxe.co/admin_mike/32/283_2.png) [@admin\_mike](https://community.pickaxe.co/u/admin_mike)\
**Post date:** [January 8, 2025, 8:47pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/7 "2025-01-08T20:47:09Z")

</div>

I could not generate the error myself when I used the tool. But looking at your settings I think it’s because you have the token limit at like 127,500/128,000 tokens so you really maxed it out. That means there’s no room for error and sometimes token counting gets funky.

I adjusted it and it should work now. Please let me know if you continue to get any errors.

---

<div class="post-metadata">

**Author:** ![equipeid](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@equipeid](https://community.pickaxe.co/u/equipeid)\
**Post date:** [January 8, 2025, 8:51pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/8 "2025-01-08T20:51:17Z")

</div>

Hi Mike,

Thanks. What is a safe token limit? I think I’ll need to adjust to other pickaxes.

Thanks!

---

<div class="post-metadata">

**Author:** ![admin\_mike](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.pickaxe.co/admin_mike/32/283_2.png) [@admin\_mike](https://community.pickaxe.co/u/admin_mike)\
**Post date:** [January 8, 2025, 8:57pm UTC](https://community.pickaxe.co/t/unexpected-token/2885/9 "2025-01-08T20:57:10Z")

</div>

Our token counting system is good, but not perfect. As its hard to always accurately tokenize. So it is possible for us to count a request at 100 tokens, then send it to OpenAI and for them to count it at 101 tokens. The reasons for this are quite complicated.

You’re using a model with a 128,000 token context window. It’s quite unlikely you really want to use all of that context. I would give it a couple thousand tokens as a buffer. Just to be safe.
